From b25174a2d02192847e9865b9948e93bee1f90b96 Mon Sep 17 00:00:00 2001
From: Li Zhou
Date: Fri, 7 Jan 2022 06:37:53 +0000
Subject: [PATCH] debian: kernel: integrate kernel image built from source
Use our kernel-std image which is built based on linux-yocto kernel
source code to replace the debian kernel image.
Also install the oot kernel-modules packages and the kernel userspace
packages onto the final iso.
The packages include:
-#kernel-std image from linux-yocto
-linux-image-5.10.0-6-amd64-unsigned
-linux-libc-dev
-#kernel-modules
-i40e
-iavf
-ice
-igb-uio
-kmod-opae-fpga-driver
-mlnx-ofed-kernel-utils
-mlnx-ofed-kernel-modules
-qat1.7.l
-#kernel userspace
-rdma-core
-libibverbs1
PASS: built image & installed & boot up on qemu;
PASS: manually checked about the packages' versions involved.
After this commit is merged, please pay attention:
Start from a clean build in case the debian kernel we used
(which has a higher version number than the one we are using now)
will affect the build-image process.
Depends-On: https://review.opendev.org/c/starlingx/kernel/+/824504
Depends-On: https://review.opendev.org/c/starlingx/tools/+/824505
Story: 2009221
Task: 44269
Signed-off-by: Li Zhou
Change-Id: Iaa67fda9a43dec4397d38f2d4fd01b1c23b10d9d
---
.../config/debian/common/base-bullseye.lst | 3 --
.../config/debian/common/base-bullseye.yaml | 2 +-
.../common/base-initramfs-bullseye.yaml | 2 +-
.../config/debian/distro/stx-std.lst | 30 +++++++++++++++++++
4 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/debian-mirror-tools/config/debian/common/base-bullseye.lst b/debian-mirror-tools/config/debian/common/base-bullseye.lst
index 656d2fe6..a82ee9dd 100644
--- a/debian-mirror-tools/config/debian/common/base-bullseye.lst
+++ b/debian-mirror-tools/config/debian/common/base-bullseye.lst
@@ -407,9 +407,6 @@ libz3-4 4.8.10-1
libzmq5 4.3.4-1
libzstd1 1.4.8+dfsg-2.1
linux-base 4.6
-linux-image-5.10.0-10-amd64 5.10.84-1
-linux-image-amd64 5.10.84-1
-linux-libc-dev 5.10.84-1
locales 2.31-13+deb11u2
locales-all 2.31-13+deb11u2
login 1:4.8.1-1
diff --git a/debian-mirror-tools/config/debian/common/base-bullseye.yaml b/debian-mirror-tools/config/debian/common/base-bullseye.yaml
index e9e3bc9e..bedd9c1b 100644
--- a/debian-mirror-tools/config/debian/common/base-bullseye.yaml
+++ b/debian-mirror-tools/config/debian/common/base-bullseye.yaml
@@ -35,7 +35,7 @@ rootfs-pre-scripts:
chroot $IMAGE_ROOTFS bash << SCRIPT_ENDOF
set -e
apt update
- apt install -y --no-install-recommends linux-image-amd64 grub-common
+ apt install -y --no-install-recommends grub-common
apt install -y --allow-downgrades --allow-unauthenticated --no-install-recommends ostree ostree-boot libostree-1-1 ostree-upgrade-mgr
apt install --no-install-recommends -y ifupdown
SCRIPT_ENDOF
diff --git a/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml
index 8c3ec66d..bcc2ff5a 100644
--- a/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml
+++ b/debian-mirror-tools/config/debian/common/base-initramfs-bullseye.yaml
@@ -39,7 +39,7 @@ packages:
- kbd
- kmod
- libostree-1-1=2019.1-1
-- linux-image-amd64
+- linux-image-5.10.0-6-amd64-unsigned
- mdadm
- mount
- mttyexec
diff --git a/debian-mirror-tools/config/debian/distro/stx-std.lst b/debian-mirror-tools/config/debian/distro/stx-std.lst
index de734eea..f2efa032 100644
--- a/debian-mirror-tools/config/debian/distro/stx-std.lst
+++ b/debian-mirror-tools/config/debian/distro/stx-std.lst
@@ -154,6 +154,21 @@ helm
#initramfs-ostree
#initramfs-ostree # only used for build
+#intel-i40e
+i40e
+
+#intel-iavf
+iavf
+
+#intel-ice
+ice
+
+#intel-igb_uio
+igb-uio
+
+#intel-opae-fpga
+kmod-opae-fpga-driver
+
#isolcpus-device-plugin
isolcpus-device-plugin-dbgsym
isolcpus-device-plugin
@@ -161,6 +176,10 @@ isolcpus-device-plugin
#k8s-pod-recovery
k8s-pod-recovery
+#kernel-std
+linux-image-5.10.0-6-amd64-unsigned
+linux-libc-dev
+
#keyrings.alt
python3-keyrings.alt
@@ -217,6 +236,10 @@ lighttpd
lldpd-dbgsym
lldpd
+#mlnx-ofa_kernel
+mlnx-ofed-kernel-modules
+mlnx-ofed-kernel-utils
+
#monitor-helm
#monitor-helm # only used for build
@@ -563,12 +586,19 @@ python3-pankoclient
#python-wsme
python3-wsme
+#qat17
+qat1.7.l
+
#rabbitmq-server
rabbitmq-server
#rabbitmq-server-config
rabbitmq-server-config
+#rdma-core
+libibverbs1
+rdma-core
+
#registry-token-server
registry-token-server