Skip to content

Commit 46fd81c

Browse files
image_types_qcom: repurpose QCOM_ESP_FILE to reference custom ESP image
The qcom-ptool partition definitions expect the ESP image to be installed as efi.bin, so there is no need to support a custom name via QCOM_ESP_FILE. Repurpose QCOM_ESP_FILE to point to the generated ESP image path instead, which is then copied as efi.bin. This enables external layers (e.g. meta-updater) to provide custom ESP images via different file paths. Signed-off-by: Ricardo Salveti <[email protected]>
1 parent 6fbe298 commit 46fd81c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

classes-recipe/image_types_qcom.bbclass

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ IMAGE_TYPES += "qcomflash"
88
QCOM_BOOT_FIRMWARE ?= ""
99

1010
QCOM_ESP_IMAGE ?= "${@bb.utils.contains("MACHINE_FEATURES", "efi", "esp-qcom-image", "", d)}"
11-
QCOM_ESP_FILE ?= "${@'efi.bin' if d.getVar('QCOM_ESP_IMAGE') else ''}"
11+
QCOM_ESP_FILE ?= "${@'${DEPLOY_DIR_IMAGE}/${QCOM_ESP_IMAGE}-${MACHINE}${IMAGE_NAME_SUFFIX}.vfat' if d.getVar('QCOM_ESP_IMAGE') else ''}"
1212

1313
# There is currently no upstream-compatible way for the firmware to
1414
# identify and load the correct DTB from a combined-dtb that contains all
@@ -38,9 +38,7 @@ IMAGE_TYPEDEP:qcomflash += "${IMAGE_QCOMFLASH_FS_TYPE}"
3838

3939
create_qcomflash_pkg() {
4040
# esp image
41-
if [ -n "${QCOM_ESP_FILE}" ]; then
42-
install -m 0644 ${DEPLOY_DIR_IMAGE}/${QCOM_ESP_IMAGE}-${MACHINE}${IMAGE_NAME_SUFFIX}.vfat ${QCOM_ESP_FILE}
43-
fi
41+
[ -n "${QCOM_ESP_FILE}" ] && install -m 0644 ${QCOM_ESP_FILE} efi.bin
4442

4543
# dtb image
4644
if [ -n "${QCOM_DTB_DEFAULT}" ] && \

0 commit comments

Comments
 (0)