diff --git a/Makefile b/Makefile index 3000d30be23c708de27d6bab1eb7f0b4a9582bd8..a94b538e4a028b51f771ce2977bcf80dec69776d 100644 --- a/Makefile +++ b/Makefile @@ -1125,7 +1125,15 @@ u-boot.bin: u-boot-nodtb.bin FORCE $(call if_changed,copy) endif -%.imx: %.bin +# we call Makefile in arch/arm/mach-imx which +# has targets which are dependent on targets defined +# here. make could not resolve them and we must ensure +# that they are finished before calling imx targets +ifeq ($(CONFIG_MULTI_DTB_FIT),y) +IMX_DEPS = u-boot-fit-dtb.bin +endif + +%.imx: $(IMX_DEPS) %.bin $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ $(BOARD_SIZE_CHECK)