classes: Add bbclass for generating UKI

A unified kernel image (UKI) can be booted directly from UEFI.
The UKI is composed by an UEFI stub, the kernel Image, initrd and
other metadata like kernel cmdline.

This bbclass upon inherting in kernel recipe, generates UKI and
places the same under DEPLOY_DIR_IMAGE.

Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com>
This commit is contained in:
Viswanath Kraleti
2023-11-22 19:08:19 +05:30
parent dd73c99506
commit b568621c47
2 changed files with 106 additions and 0 deletions
+16
View File
@@ -37,3 +37,19 @@ SERIAL_CONSOLES ?= "115200;ttyMSM0"
# image. All our boards (except db410c) have 2GiB and db410c has 1GiB of RAM,
# so this image would fit.
INITRAMFS_MAXSIZE = "393216"
# Use systemd-boot as the EFI bootloader
EFI_PROVIDER = "systemd-boot"
# Install packages at root of ESP
EFI_PREFIX = ""
# Location of Kernel and dtb inside ESP
EFILINUXDIR ?= "${EFI_PREFIX}EFI/Linux"
EFIDTBDIR ?= "${EFI_PREFIX}dtb"
# Unified Kernel Image (UKI) name
EFILINUXIMG ?= "linux-${MACHINE}.efi"
# Place dtb at EFIDTDIR to seamlessly package
KERNEL_DTBDEST = "${EFIDTBDIR}"