[arch-projects] [mkinitcpio][PATCH 1/8] functions: display proper name on file not found
Signed-off-by: Dave Reisner
Signed-off-by: Dave Reisner
Follow suit with lsinitcpio (change 0495018d) and make output colorless
on redirecting/piping stdout.
Signed-off-by: Dave Reisner
Signed-off-by: Dave Reisner
Avoiding adding a filesystem module to the whitelist when it doesn't
actually exist as a module (in case its compiled in staticly).
Signed-off-by: Dave Reisner
kmod is a bit noisier about unresolvable aliases, but we don't really
care for the purposes of creating the module whitelist.
Signed-off-by: Dave Reisner
When present, modules.order will allow depmod to order the binary module
indicies for faster lookups and more deterministic behavior in resolving
aliases. We can discard this file from the buildroot after depmod is
called.
modules.builtin.bin is added as well (generated from modules.builtin),
to allow modprobe to not fail when a symbol is provided as a builtin.
Signed-off-by: Dave Reisner
On Thu, Jan 5, 2012 at 1:26 PM, Dave Reisner
When present, modules.order will allow depmod to order the binary module indicies for faster lookups and more deterministic behavior in resolving aliases. We can discard this file from the buildroot after depmod is called.
modules.builtin.bin is added as well (generated from modules.builtin), to allow modprobe to not fail when a symbol is provided as a builtin.
Signed-off-by: Dave Reisner
--- Part of this is also to keep kmod a little quieter -- it spews some warnings when modules.order and modules.builtin don't exist, and I'd rather not hide errors/warnings if we can fix them another way. These files are, of course, not strictly necessary, but the cost is sufficiently low enough that I consider this a wash. mkinitcpio | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/mkinitcpio b/mkinitcpio index bcf56e9..54b7891 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -353,8 +353,11 @@ if (( ${#ADDED_MODULES[*]} )); then popd >/dev/null
msg "Generating module dependencies" + install -m644 -t "$BUILDROOT/lib/modules/$KERNELVERSION" \ + "$BASEDIR/lib/modules/$KERNELVERSION"/modules.{builtin,order} depmod -b "$BUILDROOT" "${KERNELVERSION}" - rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(dep.bin|alias.bin|symbols.bin) + rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(@(dep|alias|symbols|builtin).bin) No order.bin gets generated?
And on that note, what is the benefit/reason to removing these files? Do they not offer a speed benefit to modprobe module insertion on boot?
+ else warning "No modules were added to the image. This is probably not what you want." fi -- 1.7.8.1
On Thu, Jan 05, 2012 at 01:57:21PM -0600, Dan McGee wrote:
On Thu, Jan 5, 2012 at 1:26 PM, Dave Reisner
wrote: When present, modules.order will allow depmod to order the binary module indicies for faster lookups and more deterministic behavior in resolving aliases. We can discard this file from the buildroot after depmod is called.
modules.builtin.bin is added as well (generated from modules.builtin), to allow modprobe to not fail when a symbol is provided as a builtin.
Signed-off-by: Dave Reisner
--- Part of this is also to keep kmod a little quieter -- it spews some warnings when modules.order and modules.builtin don't exist, and I'd rather not hide errors/warnings if we can fix them another way. These files are, of course, not strictly necessary, but the cost is sufficiently low enough that I consider this a wash. mkinitcpio | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/mkinitcpio b/mkinitcpio index bcf56e9..54b7891 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -353,8 +353,11 @@ if (( ${#ADDED_MODULES[*]} )); then popd >/dev/null
msg "Generating module dependencies" + install -m644 -t "$BUILDROOT/lib/modules/$KERNELVERSION" \ + "$BASEDIR/lib/modules/$KERNELVERSION"/modules.{builtin,order} depmod -b "$BUILDROOT" "${KERNELVERSION}" - rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(dep.bin|alias.bin|symbols.bin) + rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(@(dep|alias|symbols|builtin).bin) No order.bin gets generated?
There is need for an order.bin -- the file isn't used other than for ordering the module indicies (when it exists).
And on that note, what is the benefit/reason to removing these files? Do they not offer a speed benefit to modprobe module insertion on boot?
We're removing everything _but_ those files (yay extglobs). The files that _do_ get discarded are things like modules.ieee1394map and modules.pcimap -- we definitely don't need these files for booting. related to the glob: i don't know why i made it so complex. modules.!(*.bin) does what I need it to do. d
+ else warning "No modules were added to the image. This is probably not what you want." fi -- 1.7.8.1
This adds functionality to pivot to back to the initramfs on shutdown,
thereby allowing the system to unmount the real root device. This will
be necessary for anyone with /usr as a separate partition.
---
Makefile | 2 +-
hooks/shutdown | 7 +++++++
install/shutdown | 17 +++++++++++++++++
shutdown | 29 +++++++++++++++++++++++++++++
4 files changed, 54 insertions(+), 1 deletions(-)
create mode 100644 hooks/shutdown
create mode 100644 install/shutdown
create mode 100755 shutdown
diff --git a/Makefile b/Makefile
index 3e7966d..e1fe5aa 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ install: all
chmod 755 ${DESTDIR}/usr/bin/lsinitcpio ${DESTDIR}/usr/bin/mkinitcpio
install -m644 mkinitcpio.conf ${DESTDIR}/etc/mkinitcpio.conf
- install -m755 -t ${DESTDIR}/lib/initcpio init
+ install -m755 -t ${DESTDIR}/lib/initcpio init shutdown
install -m644 -t ${DESTDIR}/lib/initcpio init_functions functions
install -m644 01-memdisk.rules ${DESTDIR}/lib/initcpio/udev/01-memdisk.rules
diff --git a/hooks/shutdown b/hooks/shutdown
new file mode 100644
index 0000000..7c5d9e8
--- /dev/null
+++ b/hooks/shutdown
@@ -0,0 +1,7 @@
+#!/usr/bin/ash
+
+run_hook() {
+ cp -ax / /run/initramfs
+}
+
+# vim: set ft=sh ts=4 sw=4 et:
diff --git a/install/shutdown b/install/shutdown
new file mode 100644
index 0000000..2c533b6
--- /dev/null
+++ b/install/shutdown
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+build() {
+ BINARIES='cp findmnt'
+ SCRIPT='shutdown'
+
+ add_file "/lib/initcpio/shutdown" "/shutdown"
+}
+
+help() {
+ cat <
participants (2)
-
Dan McGee
-
Dave Reisner