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 <robert.church@windriver.com>
This commit is contained in:
Robert Church 2022-02-17 11:41:31 -05:00
parent b7e04a4f3c
commit a6e4871dd9
2 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,7 @@ rootfs-pre-scripts:
chroot $IMAGE_ROOTFS bash << SCRIPT_ENDOF chroot $IMAGE_ROOTFS bash << SCRIPT_ENDOF
set -e set -e
apt update 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 -y --allow-downgrades --allow-unauthenticated --no-install-recommends ostree ostree-boot libostree-1-1 ostree-upgrade-mgr
apt install --no-install-recommends -y ifupdown apt install --no-install-recommends -y ifupdown
SCRIPT_ENDOF SCRIPT_ENDOF

View File

@ -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 # 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 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", "--"] ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/opt/LAT/lat/latd"] CMD ["/opt/LAT/lat/latd"]