Skip to content

Commit 90d0aef

Browse files
committed
image_types_qcom: prepare to handle fething images from a subdir
Add QCOM_BOOT_FILES_SUBDIR variable, which makes images_types_qcom look for bootloader and QDL files in specified subdir of the DEPLOY_DIR. Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 971ec0e commit 90d0aef

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

classes-recipe/image_types_qcom.bbclass

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ QCOM_ESP_FILE ?= "${@'efi.bin' if d.getVar('QCOM_ESP_IMAGE') else ''}"
1515
QCOM_DTB_DEFAULT ?= "${@os.path.basename(d.getVar('KERNEL_DEVICETREE').split()[0][:-4]) if d.getVar('KERNEL_DEVICETREE') else ''}"
1616
QCOM_DTB_FILE ?= "dtb.bin"
1717

18+
QCOM_BOOT_FILES_SUBDIR ?= ""
19+
1820
QCOM_ROOTFS_FILE ?= "rootfs.img"
1921
IMAGE_QCOMFLASH_FS_TYPE ??= "ext4"
2022

@@ -60,32 +62,32 @@ create_qcomflash_pkg() {
6062
install -m 0644 ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMAGE_QCOMFLASH_FS_TYPE} ${QCOM_ROOTFS_FILE}
6163

6264
# partition bins
63-
for pbin in `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type f -name 'gpt_main*.bin' \
65+
for pbin in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'gpt_main*.bin' \
6466
-o -name 'gpt_backup*.bin' -o -name 'patch*.xml'`; do
6567
install -m 0644 ${pbin} .
6668
done
6769

6870
# skip BLANK_GPT and WIPE_PARTITIONS for rawprogram xml files
69-
for rawpg in `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type f -name 'rawprogram*.xml' \
71+
for rawpg in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'rawprogram*.xml' \
7072
! -name 'rawprogram*_BLANK_GPT.xml' ! -name 'rawprogram*_WIPE_PARTITIONS.xml'`; do
7173
install -m 0644 ${rawpg} .
7274
done
7375

7476
if [ -n "${QCOM_CDT_FILE}" ]; then
75-
install -m 0644 ${DEPLOY_DIR_IMAGE}/${QCOM_CDT_FILE}.bin cdt.bin
77+
install -m 0644 ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR}/${QCOM_CDT_FILE}.bin cdt.bin
7678
# For machines with a published cdt file, let's make sure we flash it
7779
sed -i '/label="cdt"/ s/filename=""/filename="cdt.bin"/' rawprogram*.xml
7880
fi
7981

80-
for logfs in `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type f -name 'logfs_*.bin'`; do
82+
for logfs in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'logfs_*.bin'`; do
8183
install -m 0644 ${logfs} .
8284
done
83-
for zeros in `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type f -name 'zeros_*.bin'`; do
85+
for zeros in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name 'zeros_*.bin'`; do
8486
install -m 0644 ${zeros} .
8587
done
8688

8789
# boot firmware
88-
for bfw in `find ${DEPLOY_DIR_IMAGE} -maxdepth 1 -type f -name '*.elf' -o -name '*.mbn' -o -name '*.fv'`; do
90+
for bfw in `find ${DEPLOY_DIR_IMAGE}/${QCOM_BOOT_FILES_SUBDIR} -maxdepth 1 -type f -name '*.elf' -o -name '*.mbn' -o -name '*.fv'`; do
8991
install -m 0644 ${bfw} .
9092
done
9193

0 commit comments

Comments
 (0)