initramfs: T1971: Added initramfs-hook script for including modules

The script allows include to initramfs or include and force to load any modules, listed inside.
Initially, the script replaces the trick used for intel drivers
This commit is contained in:
zsdc 2020-02-25 19:04:12 +02:00
parent 0d4f8146f5
commit 309576112e

View File

@ -0,0 +1,23 @@
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line
# include listed modules to initramfs but not load them without the necessity
manual_add_modules igb ixgbe ixgbevf i40e i40evf
# include modules from file (one per line) to initramfs but not load them without the necessity
# add_modules_from_file /tmp/modlist
# include listed modules to initramfs and load them during the boot
# force_load xxx