summaryrefslogtreecommitdiff
path: root/data/live-build-config/includes.chroot
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-02-25 19:04:12 +0200
committerzsdc <taras@vyos.io>2020-02-25 19:10:14 +0200
commit309576112ee5d7c4e48fa9a0dc325a5039b40ae1 (patch)
tree9af0ab360790772d6ea474c26ddfe4903e374008 /data/live-build-config/includes.chroot
parent0d4f8146f58f35acd985ccdd357722a8f3d5a0d7 (diff)
downloadvyos-build-309576112ee5d7c4e48fa9a0dc325a5039b40ae1.tar.gz
vyos-build-309576112ee5d7c4e48fa9a0dc325a5039b40ae1.zip
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
Diffstat (limited to 'data/live-build-config/includes.chroot')
-rwxr-xr-xdata/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-add-modules23
1 files changed, 23 insertions, 0 deletions
diff --git a/data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-add-modules b/data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-add-modules
new file mode 100755
index 0000000..7ae51b4
--- /dev/null
+++ b/data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-add-modules
@@ -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