diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-01-04 20:05:31 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-01-05 21:14:25 +0100 |
commit | bd4f7d6ee8f8527625b9f240a7e5b68b2d1f87bb (patch) | |
tree | 38807ed9159e396efc83734a5a0f6cda6a83eca8 | |
parent | 52c3f56db94f8d56c584abc9b09f450551298399 (diff) | |
download | mkinitcpio-bd4f7d6ee8f8527625b9f240a7e5b68b2d1f87bb.tar.gz mkinitcpio-bd4f7d6ee8f8527625b9f240a7e5b68b2d1f87bb.tar.xz |
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 <dreisner@archlinux.org>
-rwxr-xr-x | mkinitcpio | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |