From e904332f50649df06926d0e9f3776cf656b92044 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Thu, 19 Sep 2024 01:21:24 -0700 Subject: [PATCH] Make sure the default driver is the in-tree drivers We put the out of tree drivers *.ko to weak-updates folder to make sure the in-tree drivers will be loaded by default in the original design. But we found the default drivers will be the OOT drivers in some situation, which is not that we want. The issue is same as https://access.redhat.com/solutions/3536351 where third-party kernel modules are loaded from "weak-updates" instead of "kernel" because "depmod -a" wasn't called after installation. Verification: 1. There is not out-of-tree-drivers in the boot commandline. Make sure the ice, iavf and i40e will be loaded with the in-tree drivers. 2. out-of-tree-drivers=ice, make sure the iavf and i40e will be loaded with the in-tree driver. 3. out-of-tree-drivers=ice,iavf,i40e make sure the three drivers will be loaded with the OOT drivers. Story: 2011056 Task: 51061 Change-Id: I09911490ffc9a8a690100d3b92102edab8d58328 Signed-off-by: Jiping Ma --- ...default-driver-is-the-in-tree-driver.patch | 45 +++++++++++++++++++ ostree/initramfs-ostree/debian/patches/series | 1 + 2 files changed, 46 insertions(+) create mode 100644 ostree/initramfs-ostree/debian/patches/0020-Make-sure-the-default-driver-is-the-in-tree-driver.patch diff --git a/ostree/initramfs-ostree/debian/patches/0020-Make-sure-the-default-driver-is-the-in-tree-driver.patch b/ostree/initramfs-ostree/debian/patches/0020-Make-sure-the-default-driver-is-the-in-tree-driver.patch new file mode 100644 index 000000000..59260e0f6 --- /dev/null +++ b/ostree/initramfs-ostree/debian/patches/0020-Make-sure-the-default-driver-is-the-in-tree-driver.patch @@ -0,0 +1,45 @@ +From 53f2edf7008b42b3731c5aec004f27e884839c3c Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sat, 28 Sep 2024 12:57:38 +0000 +Subject: [PATCH] Make sure the default driver is the in-tree driver + +We put the out of tree drivers *.ko to weak-updates folder to make +sure the in-tree drivers will be loaded by default in the original +design. But we found the default drivers will be the OOT drivers +in some situation, which is not that we want. + +The issue is same with https://access.redhat.com/solutions/3536351. +To fix the issue, we run "depmod -a" before load the drivers. + +Verification: +1. There is not out-of-tree-drivers in the boot cmmandline. Make + sure the ice, iavf and i40e will be loaded with the in-tree + drivers. +2. out-of-tree-drivers=ice, make sure the iavf and i40e will be + loaded with the in-tree driver. +3. out-of-tree-drivers=ice,iavf,i40e make sure the three drivers + will be loaded with the OOT drivers. + +Story: 2011056 +Task: 51061 + +Signed-off-by: Jiping Ma +--- + init-ostree.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/init-ostree.sh b/init-ostree.sh +index d1f6416..20f2a4c 100644 +--- a/init-ostree.sh ++++ b/init-ostree.sh +@@ -69,6 +69,7 @@ do_mount_fs() { + + network_modules() { + ln -s /lib/firmware/updates/intel/ice/ddp/ice-*.pkg /lib/firmware/intel/ice/ddp/ice.pkg ++ depmod -a + if grep -s -q '\sout-of-tree-drivers=' /proc/cmdline ; then + drivers=(`echo ${OOT_DRIVERS} | tr ',' ' '` ) + for driver in ${drivers[@]} +-- +2.43.0 + diff --git a/ostree/initramfs-ostree/debian/patches/series b/ostree/initramfs-ostree/debian/patches/series index df7b5c54a..ae260b221 100644 --- a/ostree/initramfs-ostree/debian/patches/series +++ b/ostree/initramfs-ostree/debian/patches/series @@ -17,3 +17,4 @@ 0017-Allow-adjusting-boot-order.patch 0018-Support-OOT-and-In-tree-drivers-switch.patch 0019-Support-the-single-driver-switch.patch +0020-Make-sure-the-default-driver-is-the-in-tree-driver.patch