Skip to content

Commit edaaaf0

Browse files
authored
Support custom ESP images in qcomflash (#1235)
Repurpose QCOM_ESP_FILE to support custom ESP images (as needed with meta-updater), and remove QCOM_ROOTFS_FILE as there is no need for a custom variable defining the rootfs image filename.
2 parents 7df29b8 + 46fd81c commit edaaaf0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

classes-recipe/image_types_qcom.bbclass

Lines changed: 3 additions & 6 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
@@ -22,7 +22,6 @@ QCOM_PARTITION_FILES_SUBDIR ??= "${QCOM_BOOT_FILES_SUBDIR}"
2222

2323
QCOM_PARTITION_CONF ?= "qcom-partition-conf"
2424

25-
QCOM_ROOTFS_FILE ?= "rootfs.img"
2625
IMAGE_QCOMFLASH_FS_TYPE ??= "ext4"
2726

2827
QCOMFLASH_DIR = "${IMGDEPLOYDIR}/${IMAGE_NAME}.qcomflash"
@@ -39,9 +38,7 @@ IMAGE_TYPEDEP:qcomflash += "${IMAGE_QCOMFLASH_FS_TYPE}"
3938

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

4643
# dtb image
4744
if [ -n "${QCOM_DTB_DEFAULT}" ] && \
@@ -73,7 +70,7 @@ create_qcomflash_pkg() {
7370
install -m 0644 "${DEPLOY_DIR_IMAGE}/boot-${MACHINE}.img" boot.img
7471

7572
# rootfs image
76-
install -m 0644 ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_QCOMFLASH_FS_TYPE} ${QCOM_ROOTFS_FILE}
73+
install -m 0644 ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_QCOMFLASH_FS_TYPE} rootfs.img
7774

7875
# partition bins
7976
for pbin in `find ${DEPLOY_DIR_IMAGE}/${QCOM_PARTITION_FILES_SUBDIR} -maxdepth 1 -type f -name 'gpt_main*.bin' \

0 commit comments

Comments
 (0)