Skip to content

Commit

Permalink
linux-qcom-uki.bb: Fix build error if INITRAMFS_IMAGE undefined
Browse files Browse the repository at this point in the history
Fixed below error seen when INITRAMFS_IMAGE is undefined.

ERROR: Error for linux-qcom-uki.bb:do_configure[depends], dependency
'${@ '${INITRAMFS_IMAGE}:do_image_complete' if d.getVar('INITRAMFS_IMAGE') else ''}' does not contain exactly one ':' character.
Task 'depends' should be specified in the form 'packagename:task'

Also removed a redundant check on KERNEL_IMAGETYPES, as the same is
already happening via SKIP_RECIPE[linux-qcom-uki].

Signed-off-by: Viswanath Kraleti <quic_vkraleti@quicinc.com>
  • Loading branch information
quic-vkraleti committed Sep 12, 2024
1 parent 574b18d commit 8881f12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions recipes-kernel/images/linux-qcom-uki.bb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ do_configure[depends] += " \
systemd-boot:do_deploy \
virtual/kernel:do_deploy \
"
do_configure[depends] += "${@ '${INITRAMFS_IMAGE}:do_image_complete' if d.getVar('INITRAMFS_IMAGE') else ''}"

python __anonymous () {
initramfs_image = d.getVar('INITRAMFS_IMAGE')
if initramfs_image:
d.appendVarFlag('do_configure', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
}

do_compile() {
# Construct the ukify command
Expand All @@ -44,7 +49,7 @@ do_compile() {
# Kernel Image
# Note: systemd-boot can't handle compressed kernel image.
kernel_image="${DEPLOY_DIR_IMAGE}/Image"
[ -f $kernel_image ] && echo "Creating UKI with $kernel_image" || bbfatal "No valid kernel image to create UKI. Add 'Image' to KERNEL_IMAGETYPES."
[ -f $kernel_image ] && echo "Creating UKI with $kernel_image"
ukify_cmd="$ukify_cmd --linux=$kernel_image"

# Kernel version
Expand Down

0 comments on commit 8881f12

Please sign in to comment.