[arch-projects] [mkinitcpio][PATCH 7/8] mkinitcpio: include modules.{builtin, order} for depmod call
Dave Reisner
d at falconindy.com
Thu Jan 5 14:26:13 EST 2012
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 <dreisner at archlinux.org>
---
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)
+
else
warning "No modules were added to the image. This is probably not what you want."
fi
--
1.7.8.1
More information about the arch-projects
mailing list