[arch-projects] [mkinitcpio][PATCH 7/8] mkinitcpio: include modules.{builtin, order} for depmod call

Dan McGee dpmcgee at gmail.com
Thu Jan 5 14:57:21 EST 2012


On Thu, Jan 5, 2012 at 1:26 PM, Dave Reisner <d at falconindy.com> 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 <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)
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
>


More information about the arch-projects mailing list