From a6e4871dd90e8c357e34f5e16741b5e158e54730 Mon Sep 17 00:00:00 2001 From: Robert Church Date: Thu, 17 Feb 2022 11:41:31 -0500 Subject: [PATCH] debian: Ensure use of the StarlingX kernel in initrd Make sure that our custom kernel is specified when building. - Included in the rootfs-pre-scripts - Override the linux-image-amd64 package specified via OSTREE_INITRD_PACKAGES in LAT (site-packages/genimage/debian_constant.py). Without these updates, ISOs generated did not contain the correct initramfs support and did not install correctly. Change-Id: Id9e4c948074bb056e902e8332e735de056dbeff5 Story: 2008846 Task: 44621 Signed-off-by: Robert Church --- debian-mirror-tools/config/debian/common/base-bullseye.yaml | 2 +- stx/dockerfiles/stx-lat-tool.Dockerfile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian-mirror-tools/config/debian/common/base-bullseye.yaml b/debian-mirror-tools/config/debian/common/base-bullseye.yaml index eb6db9dad..4402089f3 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 grub-common + apt install -y --no-install-recommends linux-image-5.10.0-6-amd64-unsigned 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/stx/dockerfiles/stx-lat-tool.Dockerfile b/stx/dockerfiles/stx-lat-tool.Dockerfile index 032ba8448..b33a3fd63 100644 --- a/stx/dockerfiles/stx-lat-tool.Dockerfile +++ b/stx/dockerfiles/stx-lat-tool.Dockerfile @@ -45,5 +45,8 @@ RUN sed -i 's/ftp.cn.debian.org/deb.debian.org/g' /opt/LAT/SDK/sysroots/x86_64-w # Fix: Align DEFAULT_INITRD_NAME with our custom names RUN sed -i 's/debian-initramfs-ostree-image/starlingx-initramfs-ostree-image/g' /opt/LAT/SDK/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python3.10/site-packages/genimage/debian_constant.py +# Fix: Align kernel with custom starlingx kernel +RUN sed -i 's/linux-image-amd64/linux-image-5.10.0-6-amd64-unsigned/g' /opt/LAT/SDK/sysroots/x86_64-wrlinuxsdk-linux/usr/lib/python3.10/site-packages/genimage/debian_constant.py + ENTRYPOINT ["/usr/bin/tini", "--"] CMD ["/opt/LAT/lat/latd"]