From dbe6b2a096b5c204ec052d589410f0a8dbc52e05 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Thu, 28 Nov 2024 05:40:53 +0000 Subject: [PATCH] install: Make sure the default driver is the in-tree drivers Also introduce the fix to install script. 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. Closes-Bug: 2089816 Change-Id: I7012e6ca114cdbe99b44e24b7a468b3bc01e865b Signed-off-by: Jiping Ma --- ...e-the-default-driver-is-the-in-tree-.patch | 42 +++++++++++++++++++ ostree/initramfs-ostree/debian/patches/series | 1 + 2 files changed, 43 insertions(+) create mode 100644 ostree/initramfs-ostree/debian/patches/0021-install-Make-sure-the-default-driver-is-the-in-tree-.patch diff --git a/ostree/initramfs-ostree/debian/patches/0021-install-Make-sure-the-default-driver-is-the-in-tree-.patch b/ostree/initramfs-ostree/debian/patches/0021-install-Make-sure-the-default-driver-is-the-in-tree-.patch new file mode 100644 index 000000000..9dfde84b3 --- /dev/null +++ b/ostree/initramfs-ostree/debian/patches/0021-install-Make-sure-the-default-driver-is-the-in-tree-.patch @@ -0,0 +1,42 @@ +From 3e24ddd80b2a2938a132a9df97038ecc0410a390 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Wed, 27 Nov 2024 06:47:11 +0000 +Subject: [PATCH] install: 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. + +Signed-off-by: Jiping Ma +--- + init-ostree-install.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/init-ostree-install.sh b/init-ostree-install.sh +index 0d047fb..712e65a 100644 +--- a/init-ostree-install.sh ++++ b/init-ostree-install.sh +@@ -479,6 +479,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.47.0 + diff --git a/ostree/initramfs-ostree/debian/patches/series b/ostree/initramfs-ostree/debian/patches/series index ae260b221..5c2ddf245 100644 --- a/ostree/initramfs-ostree/debian/patches/series +++ b/ostree/initramfs-ostree/debian/patches/series @@ -18,3 +18,4 @@ 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 +0021-install-Make-sure-the-default-driver-is-the-in-tree-.patch