From 309576112ee5d7c4e48fa9a0dc325a5039b40ae1 Mon Sep 17 00:00:00 2001 From: zsdc Date: Tue, 25 Feb 2020 19:04:12 +0200 Subject: 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 --- .../etc/initramfs-tools/hooks/10-vyos-add-modules | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-add-modules 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 00000000..7ae51b48 --- /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 -- cgit v1.2.3 From cb9b13d91011a82451cb621369fc388c9485773d Mon Sep 17 00:00:00 2001 From: zsdc Date: Fri, 28 Feb 2020 14:56:44 +0200 Subject: initramfs: T1971: Extended initramfs-hook script Included: * libnss_dns.so.2 (required for DNS resolving from initramfs) * ca-certificates.crt (required for fetching files via HTTPS) --- .../etc/initramfs-tools/hooks/10-vyos-add-modules | 23 ----------------- .../etc/initramfs-tools/hooks/10-vyos-addons | 29 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 23 deletions(-) delete mode 100755 data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-add-modules create mode 100755 data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-addons 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 deleted file mode 100755 index 7ae51b48..00000000 --- a/data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-add-modules +++ /dev/null @@ -1,23 +0,0 @@ -#!/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 diff --git a/data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-addons b/data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-addons new file mode 100755 index 00000000..79130d7c --- /dev/null +++ b/data/live-build-config/includes.chroot/etc/initramfs-tools/hooks/10-vyos-addons @@ -0,0 +1,29 @@ +#!/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 + +# executable to copy to initramfs, with library dependencies +copy_exec /usr/lib/x86_64-linux-gnu/libnss_dns.so.2 + +# copy other files ("other" here is a file type, so do not delete this keyword) +copy_file other /etc/ssl/certs/ca-certificates.crt -- cgit v1.2.3