diff --git a/ostree/initramfs-ostree/debian/patches/0008-Support-multi-drivers-in-initramfs.patch b/ostree/initramfs-ostree/debian/patches/0008-Support-multi-drivers-in-initramfs.patch new file mode 100644 index 000000000..133d65bbc --- /dev/null +++ b/ostree/initramfs-ostree/debian/patches/0008-Support-multi-drivers-in-initramfs.patch @@ -0,0 +1,38 @@ +From 21919ca120e0693419c3b97fb442edf040f660f2 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Thu, 15 Sep 2022 02:48:39 -0700 +Subject: [PATCH] Support multi-drivers in initramfs. + +Remove the network drivers ice, i40e and iavf if multi-drivers-switch +is set in cmdline, which ensures that ice, i40e and iavf drivers will +not be loaded during initramfs stage. + +pxe-network-installer will not be impacted because the parameter +multi-drivers-switch is not set in this stage. + +Signed-off-by: Jiping Ma +--- + init-ostree.sh | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/init-ostree.sh b/init-ostree.sh +index 6017fcf..b0d46a1 100644 +--- a/init-ostree.sh ++++ b/init-ostree.sh +@@ -167,6 +167,13 @@ fatal() { + + early_setup + ++if grep -s -q '\smulti-drivers-switch=' /proc/cmdline ; then ++ rm -r /lib/modules/*/updates/ice ++ rm -r /lib/modules/*/updates/i40e ++ rm -r /lib/modules/*/updates/iavf ++ echo "Removed network drivers ice, i40e and iavf" ++fi ++ + read_args + + [ -z "$CONSOLE" ] && CONSOLE="/dev/console" +-- +2.35.1 + diff --git a/ostree/initramfs-ostree/debian/patches/series b/ostree/initramfs-ostree/debian/patches/series index 5978cb317..901fffccd 100644 --- a/ostree/initramfs-ostree/debian/patches/series +++ b/ostree/initramfs-ostree/debian/patches/series @@ -5,3 +5,4 @@ 0005-Wait-for-devices-to-be-configured-after-boot.patch 0006-init-ostree-install.sh-break-hardlinks-in-var.patch 0007-Add-support-for-StarlingX-partitioning-formatting.patch +0008-Support-multi-drivers-in-initramfs.patch