From bd4f7d6ee8f8527625b9f240a7e5b68b2d1f87bb Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 4 Jan 2012 14:05:31 -0500 Subject: mkinitcpio: include modules.{builtin,order} for depmod call 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 --- mkinitcpio | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mkinitcpio b/mkinitcpio index bcf56e9..a1ea51a 100755 --- a/mkinitcpio +++ b/mkinitcpio @@ -353,8 +353,13 @@ 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) + + # remove all non-binary module.* files + rm "$BUILDROOT/lib/modules/$KERNELVERSION"/modules.!(*.bin) + else warning "No modules were added to the image. This is probably not what you want." fi -- cgit v1.2.3-24-g4f1b