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 <max.krummenacher@toradex.com>
(cherry picked from commit
f607eb8734af83a3667bb4581c1b93307e06d337)
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}