Browse Source

Improved mkinitramfs to support a MKINITRD_MODULES env variable with an explicit space delimited list of modules to additionally install and mkinitramfs/50-kernel.sh to handle the case where the requested modules don't exist.

git-svn-id: svn://svn.opensde.net/opensde/package/branches/udev@21342 10447126-35f2-4685-b0cf-6dd780d3921f
early
Alejandro Mery 18 years ago
parent
commit
d59e906f10
  1. 15
      base/mkinitramfs/files/50-kernel.sh

15
base/mkinitramfs/files/50-kernel.sh

@ -43,6 +43,8 @@ if [ -n "$moddir" ]; then
module="$1"
source="$( find "$moddir/kernel" -name "$module.ko" | head -n 1 )"
fi
if [ -r "$source" ]; then
target="lib/modules/$kernelver/${source#$moddir/}"
if [ ! -f $target ]; then
@ -54,10 +56,21 @@ if [ -n "$moddir" ]; then
module_install "$dep"
done
fi
else
modules_missing="$modules_missing $module"
echo -n " [$module]"
fi
}
echo -n "Installing modules:"
modules_missing=
if [ -n "$MKINITRD_MODULES" ]; then
for module in $MKINITRD_MODULES; do
module_install "$module"
done
fi
# greedy^3
find $moddir/kernel/drivers/{block,ata,ide,ieee1394,md,scsi,cdrom,usb,message} \
@ -68,4 +81,6 @@ if [ -n "$moddir" ]; then
echo
$DEPMOD -ae -b "$tmpdir" -F "$sysmap" "$kernelver"
[ -z "$modules_missing" ] || echo "Failed to find:$modules_missing"
fi

Loading…
Cancel
Save