Debian: LAT: upgrade to 20220527

In https://github.com/Wind-River/meta-lat, the new
version added the following commits:

  ac45af4 genimage: fix grub-editenv set failed on kernel.env
  80da090 genimage: cusomize boot menu for ISO image
  85556cd wic: support to customize syslinux.cfg for ISO image

For StarlingX, it newly supports:
1) According to `multiple-kernels' in lat yaml, install std
or rt kernel to ISO

2) According to `default-kernel' in lat yaml, set which bootloader
menu entry to boot, for std kernel, boot `All-in-one Controller',
for rt kernel boot `All-in-one (lowlatency) Controller'

3) Customize ISO bootloader menu, add two lat yaml params,
`iso-grub-entry' for grub-efi and `iso-syslinux-entry' for
syslinux

4) Define three boot entry in lat yaml: `standard controller',
`All-in-one Controller' and `All-in-one (lowlatency) Controller'

Test Plan:

Pass: build-image --std
Pass: Boot to install `Standard controller' on qemu

Pass: build-image --rt
Pass: Boot to install `Standard controller' on qemu

Depends-On: https://review.opendev.org/c/starlingx/root/+/842924
Depends-On: https://review.opendev.org/c/starlingx/tools/+/842927

Story: 2008846
Task: 45484

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Change-Id: Ie4c201c615277398bdd88c5e4f1838adfa7f7ab1
This commit is contained in:
Hongxu Jia 2022-05-27 17:09:40 +08:00
parent 034187be28
commit 1b019df645
2 changed files with 74 additions and 1 deletions

View File

@ -108,9 +108,67 @@ ostree:
debootstrap-key: ''
apt-keys:
- /opt/LAT/pubkey.rsa
iso-grub-entry: |
menuentry "UEFI All-in-one Controller Configuration" --unrestricted {
set fallback=1
efi-watchdog enable 0 180
linux /bzImage-std %BOOT_PARAMS% traits=controller,worker defaultkernel=vmlinuz-*[!t]-amd64
initrd @INITRD@
}
menuentry "UEFI Standard Controller Configuration" --unrestricted {
set fallback=1
efi-watchdog enable 0 180
linux /bzImage-std %BOOT_PARAMS% traits=controller defaultkernel=vmlinuz-*[!t]-amd64
initrd @INITRD@
}
menuentry "UEFI All-in-one (lowlatency) Controller Configuration" --unrestricted {
set fallback=1
efi-watchdog enable 0 180
linux /bzImage-rt %BOOT_PARAMS% traits=controller,worker,lowlatency defaultkernel=vmlinuz-*-rt-amd64 efi=runtime
initrd @INITRD@
}
iso-syslinux-entry: |
LABEL 0
menu label ^All-in-one Controller Configuration
kernel /bzImage-std
ipappend 2
append initrd=@INITRD@ %BOOT_PARAMS% traits=controller,worker defaultkernel=vmlinuz-*[!t]-amd64
LABEL 1
menu label ^Standard Controller Configuration
kernel /bzImage-std
ipappend 2
append initrd=@INITRD@ %BOOT_PARAMS% traits=controller defaultkernel=vmlinuz-*[!t]-amd64
LABEL 2
menu label ^All-in-one (lowlatency) Controller Configuration
kernel /bzImage-rt
ipappend 2
append initrd=@INITRD@ %BOOT_PARAMS% traits=controller,worker,lowlatency defaultkernel=vmlinuz-*-rt-amd64
iso-post-script: |
cd ${ISO_DIR}
# 0. Prepare
# According to `multiple-kernels' in lat yaml, install std
# or rt kernel to ISO
for k in ${OSTREE_MULTIPLE_KERNELS}; do
if [ "${k%%-rt-amd64}" != "${k}" ]; then
cp ${DEPLOY_DIR_IMAGE}/${k} bzImage-rt
if [ -e ${DEPLOY_DIR_IMAGE}/${k}.sig ]; then
cp ${DEPLOY_DIR_IMAGE}/${k}.sig bzImage-rt.sig
fi
else
cp ${DEPLOY_DIR_IMAGE}/${k} bzImage-std
if [ -e ${DEPLOY_DIR_IMAGE}/${k}.sig ]; then
cp ${DEPLOY_DIR_IMAGE}/${k}.sig bzImage-std.sig
fi
fi
done
# 1. Kickstart
mkdir -p kickstart
# 1.1 Kickstart example for PXE
@ -211,6 +269,21 @@ iso-post-script: |
EFI/BOOT/grub.cfg \
isolinux/isolinux.cfg
# According to `default-kernel' in lat yaml, set which
# bootloader menu entry to boot
if [ "${OSTREE_DEFAULT_KERNEL%%-rt-amd64}" != "${OSTREE_DEFAULT_KERNEL}" ]; then
# Boot rt kernel by default
sed -i "s/ set default=.*/ set default=2/g" \
EFI/BOOT/grub.cfg
sed -i "s/^DEFAULT .*/DEFAULT 2/g" \
isolinux/isolinux.cfg
else
# Boot std kernel by default
sed -i "s/^DEFAULT .*/DEFAULT 0/g" \
isolinux/isolinux.cfg
fi
# 3.2 Resign grub.cfg if EFI secure boot enabled
if [ "$EFI_SECURE_BOOT" = enable ]; then
rm EFI/BOOT/grub.cfg.sig

View File

@ -16,7 +16,7 @@ FROM debian:bullseye
MAINTAINER Chen Qi <Qi.Chen@windriver.com>
ARG LAT_BINARY_RESOURCE_PATH=http://mirror.starlingx.cengn.ca/mirror/lat-sdk/lat-sdk-20220512
ARG LAT_BINARY_RESOURCE_PATH=http://mirror.starlingx.cengn.ca/mirror/lat-sdk/lat-sdk-20220527
# Install necessary packages
RUN apt-get -y update && apt-get --no-install-recommends -y install \