Files
integ/ostree/initramfs-ostree/debian/all/patches/0018-Support-OOT-and-In-tree-drivers-switch.patch
Robert Church 69f8cdcf4a Add Trixie build support for ostree pkgs
This introduces some packages for a trixie specific build.

Changes include:
 - Add debian_trixie_pkg_dirs_std based off of debian_pkg_dirs and
   comment out all packages except for:
   - ostree/initramfs-ostree
   - ostree/mttyexec
   - ostree/ostree
   - ostree/ostree-upgrade-mgr
 - Move ostree/initramfs-ostree/debian to
   ostree/initramfs-ostree/debian/all
 - Move ostree/mttyexec/debian to ostree/mttyexec/debian/all
 - Move ostree/ostree/debian to ostree/ostree/debian/all
 - Move ostree/ostree-upgrade-mgr/debian to
   ostree/ostree-upgrade-mgr/debian/all

Test Plan:
 - PASS: bullseye: stx-init-env --rebuild, downloader, build-pkgs -a,
   build-image
 - PASS: trixie: stx-init-env --rebuild, downloader, build-pkgs -a,
   build-image

NOTE: build-image for trixie fails, but further integration is required.
      At this point it doesn't appear to be tooling related

Prototype: Concurrent Builds in master

Change-Id: I515a4eeb88f338091ca60e55a6b47f6ef4c21607
Depends-On: https://review.opendev.org/c/starlingx/root/+/946813
Story: NNNNNNN
Task: NNNNN
Signed-off-by: Robert Church <robert.church@windriver.com>
Signed-off-by: Scott Little <scott.little@windriver.com>
2025-07-09 14:58:10 -04:00

102 lines
4.7 KiB
Diff

From c357f75f321d4f1407db951e7482716acba7412f Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Sun, 3 Mar 2024 22:05:18 -0800
Subject: [PATCH 18/18] Support OOT and In-tree drivers switch
In order to select between the in-tree and OOT drivers, a cmdline
parameter multi-drivers-switch need be used. If cmdline parameter
multi-drivers-switch is set to cvl-4.0.1, the OOT drivers will be
loaded by "insmod" command before udevd is started, and that ensures
that the OOT drivers will be loaded rather than the in-tree drivers.
The default drivers will be the in-tree drivers if there is not
multi-drivers-switch in the cmdline parameters or it is not set
correct, because the out-of-tree drivers have been moved to the
"weak-updates" subdirectory, we would like them to have a lower
precedence/lower priority than the in-tree versions.
Note: The in-tree drivers will use the OOT drivers' ice.pkg file,
The version is 1.3.30.0. We will wait Intel's test result and give
feedback which DDP package should be used for the in-tree drivers,
and do the related update.
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
init-ostree-install.sh | 23 ++++++++++++-----------
init-ostree.sh | 23 ++++++++++++-----------
2 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/init-ostree-install.sh b/init-ostree-install.sh
index 092db4b..c9172de 100644
--- a/init-ostree-install.sh
+++ b/init-ostree-install.sh
@@ -478,18 +478,19 @@ do_mount_fs() {
}
network_modules() {
if grep -s -q '\smulti-drivers-switch=' /proc/cmdline ; then
- if [ -d /lib/modules/"$(uname -r)"/extra/ice-"${DRIVER_VERSION}" ]; then
- insmod /lib/modules/"$(uname -r)"/extra/ice-"${DRIVER_VERSION}"/ice.ko
- insmod /lib/modules/"$(uname -r)"/extra/i40e-"${DRIVER_VERSION}"/i40e.ko
- insmod /lib/modules/"$(uname -r)"/extra/iavf-"${DRIVER_VERSION}"/iavf.ko
- echo "Legacy NIC ${DRIVER_VERSION} drivers have been activated"
- elif [ -d /lib/modules/"$(uname -r)"/updates/ice-"${DRIVER_VERSION}" ]; then
- insmod /lib/modules/"$(uname -r)"/updates/ice-"${DRIVER_VERSION}"/ice.ko
- insmod /lib/modules/"$(uname -r)"/updates/i40e-"${DRIVER_VERSION}"/i40e.ko
- insmod /lib/modules/"$(uname -r)"/updates/iavf-"${DRIVER_VERSION}"/iavf.ko
- echo "NIC ${DRIVER_VERSION} drivers have been activated"
+ if [ -d /lib/modules/"$(uname -r)"/weak-updates/ice-"${DRIVER_VERSION}" ]; then
+ insmod /lib/modules/"$(uname -r)"/weak-updates/ice-"${DRIVER_VERSION}"/ice.ko
+ insmod /lib/modules/"$(uname -r)"/weak-updates/i40e-"${DRIVER_VERSION}"/i40e.ko
+ insmod /lib/modules/"$(uname -r)"/weak-updates/iavf-"${DRIVER_VERSION}"/iavf.ko
+ echo "OOT NIC ${DRIVER_VERSION} drivers have been activated"
+ else
+ ln -s /lib/firmware/updates/intel/ice/ddp/ice-*.pkg /lib/firmware/intel/ice/ddp/ice.pkg
+ echo "In-tree NIC drivers have been activated"
fi
- fi
+ else
+ ln -s /lib/firmware/updates/intel/ice/ddp/ice-*.pkg /lib/firmware/intel/ice/ddp/ice.pkg
+ echo "In-tree NIC drivers have been activated"
+ fi
}
disable_lvm() {
diff --git a/init-ostree.sh b/init-ostree.sh
index 32de301..c74f350 100644
--- a/init-ostree.sh
+++ b/init-ostree.sh
@@ -69,18 +69,19 @@ do_mount_fs() {
network_modules() {
if grep -s -q '\smulti-drivers-switch=' /proc/cmdline ; then
- if [ -d /lib/modules/"$(uname -r)"/extra/ice-"${DRIVER_VERSION}" ]; then
- insmod /lib/modules/"$(uname -r)"/extra/ice-"${DRIVER_VERSION}"/ice.ko
- insmod /lib/modules/"$(uname -r)"/extra/i40e-"${DRIVER_VERSION}"/i40e.ko
- insmod /lib/modules/"$(uname -r)"/extra/iavf-"${DRIVER_VERSION}"/iavf.ko
- echo "Legacy NIC ${DRIVER_VERSION} drivers have been activated"
- elif [ -d /lib/modules/"$(uname -r)"/updates/ice-"${DRIVER_VERSION}" ]; then
- insmod /lib/modules/"$(uname -r)"/updates/ice-"${DRIVER_VERSION}"/ice.ko
- insmod /lib/modules/"$(uname -r)"/updates/i40e-"${DRIVER_VERSION}"/i40e.ko
- insmod /lib/modules/"$(uname -r)"/updates/iavf-"${DRIVER_VERSION}"/iavf.ko
- echo "NIC ${DRIVER_VERSION} drivers have been activated"
+ if [ -d /lib/modules/"$(uname -r)"/weak-updates/ice-"${DRIVER_VERSION}" ]; then
+ insmod /lib/modules/"$(uname -r)"/weak-updates/ice-"${DRIVER_VERSION}"/ice.ko
+ insmod /lib/modules/"$(uname -r)"/weak-updates/i40e-"${DRIVER_VERSION}"/i40e.ko
+ insmod /lib/modules/"$(uname -r)"/weak-updates/iavf-"${DRIVER_VERSION}"/iavf.ko
+ echo "OOT NIC ${DRIVER_VERSION} drivers have been activated"
+ else
+ ln -s /lib/firmware/updates/intel/ice/ddp/ice-*.pkg /lib/firmware/intel/ice/ddp/ice.pkg
+ echo "In-tree NIC drivers have been activated"
fi
- fi
+ else
+ ln -s /lib/firmware/updates/intel/ice/ddp/ice-*.pkg /lib/firmware/intel/ice/ddp/ice.pkg
+ echo "In-tree NIC drivers have been activated"
+ fi
}
disable_lvm() {
--
2.42.0