From 45db18727813b50b8f16a04830f82f7280f55591 Mon Sep 17 00:00:00 2001 From: Maxim Paymushkin Date: Mon, 27 Feb 2023 21:26:44 +0100 Subject: u-boot-imx: deploy multiple boot images for i.MX 8M if env UBOOT_CONFIG contains multiple U-boot configurations, then "do_deploy_append_mx8m" always returns an error due to installing the same dtb-file defined in env UBOOT_DTB_NAME. Even env UBOOT_DTB_NAME contains the same dtb-name for all U-boot configs it can not be used without an extra suffix (U-boot config) because different U-boot configs can generate different dtb files based on the same dts file. In case different UBOOT_DTB_NAMEs are used in U-boot configurations, then the same flags for env UBOOT_DTB_NAME must be used in the machine configuration as in U-boot configurations. UBOOT_CONFIG = "a b" UBOOT_DTB_NAME[a] = "a.dtb" UBOOT_DTB_NAME[b] = "b.dtb" See PR #1439 and #1642 Signed-off-by: Maxim Paymushkin Signed-off-by: Daiane Angolini --- recipes-bsp/u-boot/u-boot-imx_2023.04.bb | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/u-boot/u-boot-imx_2023.04.bb b/recipes-bsp/u-boot/u-boot-imx_2023.04.bb index 3d588564..14c226f7 100644 --- a/recipes-bsp/u-boot/u-boot-imx_2023.04.bb +++ b/recipes-bsp/u-boot/u-boot-imx_2023.04.bb @@ -27,8 +27,27 @@ do_deploy:append:mx8m-generic-bsp() { if [ $j -eq $i ] then install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0644 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0644 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type} + install -m 0644 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type} + UBOOT_DTB_NAME_FLAGS="${type}:${UBOOT_DTB_NAME}" + for key_value in ${UBOOT_DTB_NAME_FLAGS}; do + local type_key="${key_value%%:*}" + local dtb_name="${key_value#*:}" + if [ "$type_key" = "$type" ] + then + bbnote "UBOOT_CONFIG = $type, UBOOT_DTB_NAME = $dtb_name" + # There is only one ${dtb_name}, the first one. All the other are with the type appended + if [ ! -f "${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name}" ]; then + install -m 0644 ${B}/${config}/arch/arm/dts/${dtb_name} ${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name} + else + bbwarn "Use custom wks.in for $dtb_name = $type" + fi + install -m 0644 ${B}/${config}/arch/arm/dts/${dtb_name} ${DEPLOYDIR}/${BOOT_TOOLS}/${dtb_name}-${type} + fi + unset type_key + unset dtb_name + done + + unset UBOOT_DTB_NAME_FLAGS fi done unset j -- cgit v1.2.3-54-g00ecf From 23af0e4d3526bb5c2b59731f76874d127efba58c Mon Sep 17 00:00:00 2001 From: Daiane Angolini Date: Wed, 20 Sep 2023 11:48:18 -0300 Subject: imx-boot-container: Create only one imx-boot Only the first UBOOT_CONFIG generate a imx-boot and flash.bin symlink. Every UBOOT_CONFIG creates a flash.bin-${MACHINE}-${type} binary. Signed-off-by: Daiane Angolini --- classes/imx-boot-container.bbclass | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 308e75d7..53c70a0b 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass @@ -92,14 +92,14 @@ do_deploy:append() { then install -m 0644 ${B}/${config}/flash.bin ${DEPLOYDIR}/flash.bin-${MACHINE}-${type} # When there's more than one word in UBOOT_CONFIG, - # this will overwrite the links created in - # previous loop iterations, effectively making - # u-boot.itb and flash.bin correspond to the _last_ - # word in UBOOT_CONFIG. This is also how all other - # artifacts handled by oe-core's u-boot.inc are - # treated. - ln -sf flash.bin-${MACHINE}-${type} flash.bin - ln -sf flash.bin-${MACHINE}-${type} imx-boot + # the first UBOOT_CONFIG listed will be the imx-boot binary + if [ ! -f "${DEPLOYDIR}/imx-boot" ]; then + ln -sf flash.bin-${MACHINE}-${type} flash.bin + ln -sf flash.bin-${MACHINE}-${type} imx-boot + + else + bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" + fi fi done unset j -- cgit v1.2.3-54-g00ecf From e61f27077d7f92713d8b97a642fc2e196ba6508d Mon Sep 17 00:00:00 2001 From: Daiane Angolini Date: Fri, 18 Aug 2023 13:39:44 -0300 Subject: imx-boot: allow deploy multiple u-boot Generate multiple U-boots if env UBOOT_CONFIG contains multiple configs and support for the case where env UBOOT_DTB_NAME is defined in the machine's configuration and has flags for each dtb-file for a specific u-boot configs. UBOOT_CONFIG = "a b" UBOOT_DTB_NAME[a] = "a.dtb" UBOOT_DTB_NAME[b] = "b.dtb" Skip to create symlink as imx-boot in deploy directory and print warning about unique wks.in file if env UBOOT_CONFIG contains multiple configs. This prevents wic-images from been created that only point on imx-boot. See PR #1439 and #1642 Signed-off-by: Maxim Paymushkin Signed-off-by: Daiane Angolini --- recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 174 +++++++++++++++++++++++--------- 1 file changed, 126 insertions(+), 48 deletions(-) diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 1d501ec1..df2d6629 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb @@ -43,9 +43,6 @@ SC_FIRMWARE_NAME ?= "scfw_tcm.bin" ATF_MACHINE_NAME ?= "bl31-${ATF_PLATFORM}.bin" ATF_MACHINE_NAME:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}" -UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" -BOOT_CONFIG_MACHINE = "${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG}.bin" - TOOLS_NAME ?= "mkimage_imx8" IMX_BOOT_SOC_TARGET ?= "INVALID" @@ -82,28 +79,35 @@ compile_mx8m() { bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} " cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING} done + cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING} cp ${DEPLOY_DIR_IMAGE}/signed_hdmi_imx8m.bin ${BOOT_STAGING} - cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ ${BOOT_STAGING}/u-boot-spl.bin + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} + if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then # Use DTB binary patched with signature node cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME} fi - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ + + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ ${BOOT_STAGING}/u-boot-nodtb.bin + cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin - cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin + + cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin + } compile_mx8() { bbnote 8QM boot binary build cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin - cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin + cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} - if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then - cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then + cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ ${BOOT_STAGING}/u-boot-spl.bin fi } @@ -113,9 +117,9 @@ compile_mx8x() { cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING} cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin - cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin - if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then - cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin + if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then + cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ ${BOOT_STAGING}/u-boot-spl.bin fi } @@ -125,9 +129,9 @@ compile_mx8ulp() { cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/upower.bin ${BOOT_STAGING}/upower.bin - cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin - if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then - cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin + if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then + cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ ${BOOT_STAGING}/u-boot-spl.bin fi } @@ -141,9 +145,9 @@ compile_mx93() { cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}/ cp ${DEPLOY_DIR_IMAGE}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin - cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin - if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then - cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${BOOT_STAGING}/u-boot.bin + if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then + cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ ${BOOT_STAGING}/u-boot-spl.bin fi } @@ -154,50 +158,103 @@ do_compile() { if ${DEPLOY_OPTEE}; then cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING} fi - for target in ${IMXBOOT_TARGETS}; do - compile_${SOC_FAMILY} - if [ "$target" = "flash_linux_m4_no_v2x" ]; then - # Special target build for i.MX 8DXL with V2X off - bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" - make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4 + for type in ${UBOOT_CONFIG}; do + if [ "${@d.getVarFlags('UBOOT_DTB_NAME')}" = "None" ]; then + UBOOT_DTB_NAME_FLAGS="${type}:${UBOOT_DTB_NAME}" else - bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}" - make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target} - fi - if [ -e "${BOOT_STAGING}/flash.bin" ]; then - cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target} + UBOOT_DTB_NAME_FLAGS="${@' '.join(flag + ':' + dtb for flag, dtb in (d.getVarFlags('UBOOT_DTB_NAME')).items()) if d.getVarFlags('UBOOT_DTB_NAME') is not None else '' }" fi + + for key_value in ${UBOOT_DTB_NAME_FLAGS}; do + type_key="${key_value%%:*}" + dtb_name="${key_value#*:}" + + if [ "$type_key" = "$type" ] + then + bbnote "UBOOT_CONFIG = $type, UBOOT_DTB_NAME = $dtb_name" + + UBOOT_CONFIG_EXTRA="$type_key" + if [ -e ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${dtb_name}-${type} ] ; then + UBOOT_DTB_NAME_EXTRA="${dtb_name}-${type}" + else + # backward compatibility + UBOOT_DTB_NAME_EXTRA="${dtb_name}" + fi + UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" + BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" + + for target in ${IMXBOOT_TARGETS}; do + compile_${SOC_FAMILY} + if [ "$target" = "flash_linux_m4_no_v2x" ]; then + # Special target build for i.MX 8DXL with V2X off + bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" + make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME_EXTRA} flash_linux_m4 + else + bbnote "building ${IMX_BOOT_SOC_TARGET} - ${REV_OPTION} ${target}" + make SOC=${IMX_BOOT_SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME_EXTRA} ${target} + fi + if [ -e "${BOOT_STAGING}/flash.bin" ]; then + cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} + fi + done + + unset UBOOT_CONFIG_EXTRA + unset UBOOT_DTB_NAME_EXTRA + unset UBOOT_NAME_EXTRA + unset BOOT_CONFIG_MACHINE_EXTRA + fi + + unset type_key + unset dtb_name + done + + unset UBOOT_DTB_NAME_FLAGS done + unset type } do_install () { install -d ${D}/boot - for target in ${IMXBOOT_TARGETS}; do - install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${D}/boot/ + for type in ${UBOOT_CONFIG}; do + + bbnote "UBOOT_CONFIG = $type" + + UBOOT_CONFIG_EXTRA="$type" + BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" + + for target in ${IMXBOOT_TARGETS}; do + install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} ${D}/boot/ + done + + unset UBOOT_CONFIG_EXTRA + unset BOOT_CONFIG_MACHINE_EXTRA done + + unset type } deploy_mx8m() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ - ${DEPLOYDIR}/${BOOT_TOOLS} for ddr_firmware in ${DDR_FIRMWARE_NAME}; do install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS} done + install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS} } + deploy_mx8() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} - if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then - install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ + if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then + install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ ${DEPLOYDIR}/${BOOT_TOOLS} fi } + deploy_mx8x() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} @@ -212,7 +269,7 @@ deploy_mx8ulp() { install -d ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} - if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then + if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ ${DEPLOYDIR}/${BOOT_TOOLS} fi @@ -235,27 +292,48 @@ deploy_mx93() { do_deploy() { deploy_${SOC_FAMILY} - # copy the sc fw, dcd and uboot to deploy path - install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} # copy tee.bin to deploy path if ${DEPLOY_OPTEE}; then install -m 0644 ${DEPLOY_DIR_IMAGE}/tee.bin ${DEPLOYDIR}/${BOOT_TOOLS} fi - # copy makefile (soc.mak) for reference install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS} - # copy the generated boot image to deploy path - for target in ${IMXBOOT_TARGETS}; do - # Use first "target" as IMAGE_IMXBOOT_TARGET - if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then - IMAGE_IMXBOOT_TARGET="$target" - echo "Set boot target as $IMAGE_IMXBOOT_TARGET" + + for type in ${UBOOT_CONFIG}; do + UBOOT_CONFIG_EXTRA="$type" + UBOOT_NAME_EXTRA="u-boot-${MACHINE}.bin-${UBOOT_CONFIG_EXTRA}" + BOOT_CONFIG_MACHINE_EXTRA="${BOOT_NAME}-${MACHINE}-${UBOOT_CONFIG_EXTRA}.bin" + + if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} ] ; then + install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG_EXTRA} \ + ${DEPLOYDIR}/${BOOT_TOOLS} + fi + # copy the tool mkimage to deploy path and sc fw, dcd and uboot + install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME_EXTRA} ${DEPLOYDIR}/${BOOT_TOOLS} + + # copy the generated boot image to deploy path + for target in ${IMXBOOT_TARGETS}; do + # Use first "target" as IMAGE_IMXBOOT_TARGET + if [ "$IMAGE_IMXBOOT_TARGET" = "" ]; then + IMAGE_IMXBOOT_TARGET="$target" + echo "Set boot target as $IMAGE_IMXBOOT_TARGET" + fi + install -m 0644 ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target} ${DEPLOYDIR} + done + + # The first UBOOT_CONFIG listed will be the ${BOOT_NAME} binary + if [ ! -f "${DEPLOYDIR}/${UUU_BOOTLOADER}" ]; then + ln -sf ${BOOT_CONFIG_MACHINE_EXTRA}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME} + else + bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" fi - install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${target} ${DEPLOYDIR} - done - ln -sf ${BOOT_CONFIG_MACHINE}-${IMAGE_IMXBOOT_TARGET} ${DEPLOYDIR}/${BOOT_NAME} + unset UBOOT_CONFIG_EXTRA + unset UBOOT_NAME_EXTRA + unset BOOT_CONFIG_MACHINE_EXTRA + done + unset type } addtask deploy before do_build after do_compile -- cgit v1.2.3-54-g00ecf