diff --git a/classes/image_types_tegra.bbclass b/classes/image_types_tegra.bbclass index 1a3fccfa8650..8820555458c6 100644 --- a/classes/image_types_tegra.bbclass +++ b/classes/image_types_tegra.bbclass @@ -71,7 +71,7 @@ IMAGE_TEGRAFLASH_ESPIMG ?= "${DEPLOY_DIR_IMAGE}/${TEGRA_ESP_IMAGE}-${MACHINE}.es DATAFILE ??= "" IMAGE_TEGRAFLASH_DATA ??= "" -IMAGE_TEGRAFLASH_INITRD_FLASHER = "${DEPLOY_DIR_IMAGE}/${TEGRAFLASH_INITRD_FLASH_IMAGE}-${MACHINE}.cboot" +IMAGE_TEGRAFLASH_INITRD_FLASHER ?= "${@'${DEPLOY_DIR_IMAGE}/${TEGRAFLASH_INITRD_FLASH_IMAGE}-${MACHINE}.cboot' if d.getVar('TEGRAFLASH_INITRD_FLASH_IMAGE') != '' else ''}" TEGRA_SPIFLASH_BOOT ??= "" TEGRA_ROOTFS_AND_KERNEL_ON_SDCARD ??="" @@ -333,7 +333,9 @@ create_tegraflash_pkg:tegra194() { cp "${STAGING_DATADIR}/tegraflash/${EMMC_BCT_OVERRIDE}" . cp "${IMAGE_TEGRAFLASH_KERNEL}" ./${LNXFILE} cp "${IMAGE_TEGRAFLASH_ESPIMG}" ./esp.img - cp "${IMAGE_TEGRAFLASH_INITRD_FLASHER}" ./initrd-flash.img + if [ -n "${IMAGE_TEGRAFLASH_INITRD_FLASHER}" ]; then + cp "${IMAGE_TEGRAFLASH_INITRD_FLASHER}" ./initrd-flash.img + fi if [ -n "${DATAFILE}" -a -n "${IMAGE_TEGRAFLASH_DATA}" ]; then cp "${IMAGE_TEGRAFLASH_DATA}" ./${DATAFILE} DATAARGS="--datafile ${DATAFILE}" @@ -359,6 +361,9 @@ create_tegraflash_pkg:tegra194() { copy_dtbs "${WORKDIR}/tegraflash" if [ "${TEGRA_SIGNING_EXCLUDE_TOOLS}" != "1" ]; then cp -R ${STAGING_BINDIR_NATIVE}/${FLASHTOOLS_DIR}/* . + if [ -z "${IMAGE_TEGRAFLASH_INITRD_FLASHER}" ]; then + rm -f ./initrd-flash + fi mv ./rollback_parser.py ./rollback/ tegraflash_generate_bupgen_script fi @@ -380,8 +385,10 @@ create_tegraflash_pkg:tegra194() { MACHINE=${TNSPEC_MACHINE} ./tegra194-flash-helper.sh $DATAARGS flash.xml.in ${DTBFILE} ${EMMC_BCT},${EMMC_BCT_OVERRIDE} ${ODMDATA} ${LNXFILE} ${IMAGE_BASENAME}.${IMAGE_TEGRAFLASH_FS_TYPE} "\$@" END chmod +x doflash.sh - rm -f .env.initrd-flash - cat > .env.initrd-flash < .env.initrd-flash < burnfuses.sh < .env.initrd-flash < .env.initrd-flash < burnfuses.sh <