]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Fix generation of flash.bin u-boot.itb with binman
authorMarek Vasut <marex@denx.de>
Thu, 25 Feb 2021 20:50:59 +0000 (21:50 +0100)
committerStefano Babic <sbabic@denx.de>
Sun, 2 May 2021 10:12:42 +0000 (12:12 +0200)
In case binman is enabled, the u-boot.itb is generated using this tool
and there is no direct u-boot.itb target, but instead the binman tool
must be invoked. Add support for this case.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Makefile

index 404977efa527d2205381fd7561823442e280570d..0486f2e59cb71e9aaf26c24e19d50ced4087986d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1493,10 +1493,16 @@ u-boot.cnt: u-boot.bin FORCE
 flash.bin: spl/u-boot-spl.bin u-boot.cnt FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
 else
+ifeq ($(CONFIG_BINMAN),y)
+flash.bin: spl/u-boot-spl.bin $(INPUTS-y) FORCE
+       $(call if_changed,binman)
+       $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
+else
 flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
 endif
 endif
+endif
 
 u-boot.uim: u-boot.bin FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@