Skip to content

Commit 3f2b8ac

Browse files
authored
esp-qcom-image: convert to OE-core uki.bbclass (#722)
This new class uses the OE-core uki.bbclass infrastructure to assemble an ESP image with systemd-boot + UKI. It uses method #2 for config-less booting. Systemd-boot is installed through package management, the UKI is picked up from deploy. Signed-off-by: Koen Kooi [koen.kooi@oss.qualcomm.com](mailto:koen.kooi@oss.qualcomm.com) Fixes #707
2 parents 5e3c5b7 + 8a9759b commit 3f2b8ac

File tree

3 files changed

+28
-135
lines changed

3 files changed

+28
-135
lines changed

classes/uki-esp-image.bbclass

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Create an ESP image that has a type #2 EFI UKI and systemd-boot
2+
#
3+
# Copyright (c) 2025 Qualcomm Innovation Center, Inc.
4+
#
5+
# SPDX-License-Identifier: MIT
6+
#
7+
8+
# Optional subfolder, dependant on where the ESP partition gets mounted
9+
# intended to only have a leading slash, no trailing slash e.g. '/EFI', or just empty, ''
10+
ESPFOLDER ?= "/EFI"
11+
12+
do_ukiesp() {
13+
mkdir -p ${IMAGE_ROOTFS}${ESPFOLDER}/EFI/Linux
14+
15+
# Copy over files from deploy into the rootfs
16+
install -m 0755 ${DEPLOY_DIR_IMAGE}/${UKI_FILENAME} ${IMAGE_ROOTFS}${ESPFOLDER}/EFI/Linux
17+
}
18+
19+
addtask ukiesp after do_deploy uki before do_image_complete do_image_wic

recipes-kernel/images/esp-qcom-image.bb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
DESCRIPTION = "EFI System Partition Image to boot Qualcomm boards"
22

33
PACKAGE_INSTALL = " \
4-
linux-qcom-uki \
54
systemd-boot \
65
"
76

87
KERNELDEPMODDEPEND = ""
98
KERNEL_DEPLOY_DEPEND = ""
109

11-
inherit image
10+
ESPFOLDER = ""
11+
inherit image uki uki-esp-image
12+
13+
UKI_FILENAME = "${EFI_LINUX_IMG}"
14+
15+
UKI_CMDLINE = "root=${QCOM_BOOTIMG_ROOTFS} rw rootwait"
16+
17+
# Remove 'upstream' dtb, rely on EFI provided one
18+
KERNEL_DEVICETREE = ""
1219

1320
IMAGE_FSTYPES = "vfat"
1421
IMAGE_FSTYPES_DEBUGFS = ""

recipes-kernel/images/linux-qcom-uki.bb

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)