Skip to content

Commit 4f01b2b

Browse files
committed
uki-esp-image bbclass: initial add
This class uses the OE-core uki.bbclass infrastructure to assemble an ESP image with systemd-boot + UKI. Systemd-boot is installed through package management, the UKI is picked up from deploy. Signed-off-by: Koen Kooi <koen.kooi@oss.qualcomm.com>
1 parent 4e69d99 commit 4f01b2b

File tree

3 files changed

+29
-135
lines changed

3 files changed

+29
-135
lines changed

classes/uki-esp-image.bbclass

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

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
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-esp-image
12+
13+
inherit uki
14+
UKI_FILENAME = "${EFI_LINUX_IMG}"
15+
16+
UKI_CMDLINE="root=${QCOM_BOOTIMG_ROOTFS} rw rootwait"
17+
18+
# Remove leading 'qcom/' from KERNEL_DEVICEREE, we store the file in DEPLOY_DIR_IMAGE directly, not in the qcom/ subfolder
19+
#KERNEL_DEVICETREE := "${@d.getVar('KERNEL_DEVICETREE').strip().replace('qcom/','')}"
20+
21+
# Remove 'upstream' dtb, rely on EFI provided one
22+
KERNEL_DEVICETREE = ""
1223

1324
IMAGE_FSTYPES = "vfat"
1425
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)