From f607eb8734af83a3667bb4581c1b93307e06d337 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 31 Aug 2020 16:28:57 +0200 Subject: imx-boot: allow for additional/different u-boot device-tree With the current call to imx-mkimage and SOC_TARGET = "iMX8M" the u-boot device tree file name is set to $(PLAT)-evk.dtb in iMX8M/soc.mak which happens to match ${UBOOT_DTB_NAME} if building for an NXP machine. Setting the dtbs environment variable to ${UBOOT_DTB_NAME} makes the build succeed also for other machines. In the hardcoded version $(dtbs) is an intermediate file and gets delete as the last step of make. Thus for several make targets we have to redo the copy step before each make invocation or the second one will fail as the device tree file is then missing. Signed-off-by: Max Krummenacher --- recipes-bsp/imx-mkimage/imx-boot_1.0.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb index 4b6ef699..a54b439d 100644 --- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb +++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb @@ -126,20 +126,20 @@ compile_mx8x() { fi } do_compile() { - compile_${SOC_FAMILY} # mkimage for i.MX8 # Copy TEE binary to SoC target folder to mkimage 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 ${SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}" - make SOC=${SOC_TARGET} ${REV_OPTION} V2X=NO flash_linux_m4 + make SOC=${SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4 else bbnote "building ${SOC_TARGET} - ${REV_OPTION} ${target}" - make SOC=${SOC_TARGET} ${REV_OPTION} ${target} + make SOC=${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} -- cgit v1.2.3-54-g00ecf