Skip to content

Commit

Permalink
image_types_qcom: create image-specific subfolders
Browse files Browse the repository at this point in the history
Create image-specific subfolder in DEPLOY_DIR_IMAGE besides qcomflash
tarball archive. This allows to run QDL for device flashing
on that folder directly for local builds.

Signed-off-by: Igor Opaniuk <[email protected]>
  • Loading branch information
igoropaniuk committed Jan 10, 2025
1 parent e485b11 commit 17e20ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes-recipe/image_types_qcom.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ QCOM_DTB_FILE ?= "dtb.bin"
QCOM_ROOTFS_FILE ?= "rootfs.img"
IMAGE_QCOMFLASH_FS_TYPE ??= "ext4"

QCOMFLASH_DIR = "${WORKDIR}/qcomflash"
QCOMFLASH_DIR = "${IMGDEPLOYDIR}/${IMAGE_NAME}"
IMAGE_CMD:qcomflash = "create_qcomflash_pkg"
do_image_qcomflash[dirs] = "${QCOMFLASH_DIR}"
do_image_qcomflash[cleandirs] = "${QCOMFLASH_DIR}"
do_image_qcomflash[depends] += "qcom-gen-partition-bins:do_deploy virtual/kernel:do_deploy \
${@'${QCOM_ESP_IMAGE}:do_image_complete' if d.getVar('QCOM_ESP_IMAGE') != '' else ''}"
IMAGE_TYPEDEP:qcomflash += "${IMAGE_QCOMFLASH_FS_TYPE}"
Expand Down Expand Up @@ -68,6 +67,9 @@ create_qcomflash_pkg() {
install -m 0644 ${bfw} .
done

# Create symlink to ${QCOMFLASH_DIR} dir
ln -rsf ${QCOMFLASH_DIR} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}

# Create qcomflash tarball
${IMAGE_CMD_TAR} --sparse --numeric-owner --transform="s,^\./,${IMAGE_BASENAME}-${MACHINE}/," -cf- . | gzip -f -9 -n -c --rsyncable > ${IMGDEPLOYDIR}/${IMAGE_NAME}.qcomflash.tar.gz
ln -sf ${IMAGE_NAME}.qcomflash.tar.gz ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.qcomflash.tar.gz
Expand Down

0 comments on commit 17e20ee

Please sign in to comment.