Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: esp-qcom-image: convert to OE-core uki.bbclass #138

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions classes/uki-esp-image.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Create an ESP image that has a type #2 EFI UKI and systemd-boot

# Optional subfolder, dependant on where the ESP partition gets mounted
# intended to only have a leading slash, no trailing slash e.g. '/EFI', or just empty, ''
ESPFOLDER ?= "/EFI"

do_ukiesp() {
mkdir -p ${IMAGE_ROOTFS}${ESPFOLDER}/EFI/Linux

# Copy over files from deploy into the rootfs
install -m 0755 ${DEPLOY_DIR_IMAGE}/${UKI_FILENAME} ${IMAGE_ROOTFS}${ESPFOLDER}/EFI/Linux
}

addtask ukiesp after do_deploy uki before do_image_complete do_image_wic


15 changes: 13 additions & 2 deletions recipes-kernel/images/esp-qcom-image.bb
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
DESCRIPTION = "EFI System Partition Image to boot Qualcomm boards"

PACKAGE_INSTALL = " \
linux-qcom-uki \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also noticed that in our current UKI (we build with linux-qcom-uki) we do not set an initrd, while I think there is one by default with the upstream uki class. It's a boot behavior change that we need to be aware of. We might want an initrd, but we should not make this change without an explicit commit/discussion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initrd or initramfs? They are subtly different in how the / mountpoint is pivoted or not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use none of them right now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to use initrd with meta-qcom-distro, but here I don't think it is needed / used.

systemd-boot \
"

KERNELDEPMODDEPEND = ""
KERNEL_DEPLOY_DEPEND = ""

inherit image
ESPFOLDER = ""
inherit image uki-esp-image

inherit uki
UKI_FILENAME = "${EFI_LINUX_IMG}"

UKI_CMDLINE="root=${QCOM_BOOTIMG_ROOTFS} rw rootwait"

# Remove leading 'qcom/' from KERNEL_DEVICEREE, we store the file in DEPLOY_DIR_IMAGE directly, not in the qcom/ subfolder
#KERNEL_DEVICETREE := "${@d.getVar('KERNEL_DEVICETREE').strip().replace('qcom/','')}"

# Remove 'upstream' dtb, rely on EFI provided one
KERNEL_DEVICETREE = ""

IMAGE_FSTYPES = "vfat"
IMAGE_FSTYPES_DEBUGFS = ""
Expand Down
133 changes: 0 additions & 133 deletions recipes-kernel/images/linux-qcom-uki.bb

This file was deleted.

Loading