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 <jiping.ma2@windriver.com>
This commit is contained in:
Jiping Ma 2024-11-28 05:40:53 +00:00
parent 896f2eb78f
commit dbe6b2a096
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,42 @@
From 3e24ddd80b2a2938a132a9df97038ecc0410a390 Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
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 <jiping.ma2@windriver.com>
---
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

View File

@ -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