[PATCH] Makefile: Fix generation of flash.bin u-boot.itb with binman

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 | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/Makefile b/Makefile index 079881b62ab..a0456dd5859 100644 --- a/Makefile +++ b/Makefile @@ -1542,10 +1542,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-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@

On 2/25/21 9:50 PM, Marek Vasut wrote:
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
This bugfix is still missing from upstream.

On Sat, Apr 24, 2021 at 8:57 PM Marek Vasut marex@denx.de wrote:
On 2/25/21 9:50 PM, Marek Vasut wrote:
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
This bugfix is still missing from upstream.
+ Simon

Hi,
On Thu, 29 Apr 2021 at 17:11, Bin Meng bmeng.cn@gmail.com wrote:
On Sat, Apr 24, 2021 at 8:57 PM Marek Vasut marex@denx.de wrote:
On 2/25/21 9:50 PM, Marek Vasut wrote:
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
This bugfix is still missing from upstream.
It seems to be missing a Fixes tag?
I can't really comment on this particular patch as it is up to MX8 what is done here.
But a much better solution is to move this generation stuff to binman, instead of all the arch-specific Makefile rules.
Regards, Simon

On 4/30/21 8:13 PM, Simon Glass wrote:
Hi,
Hello Simon,
On Thu, 29 Apr 2021 at 17:11, Bin Meng bmeng.cn@gmail.com wrote:
On Sat, Apr 24, 2021 at 8:57 PM Marek Vasut marex@denx.de wrote:
On 2/25/21 9:50 PM, Marek Vasut wrote:
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
This bugfix is still missing from upstream.
It seems to be missing a Fixes tag?
There are way too many commits related to this to identify specific one.
I can't really comment on this particular patch as it is up to MX8 what is done here.
In that case, deciding on this bugfix is up to the maintainer, Stefano.
But a much better solution is to move this generation stuff to binman, instead of all the arch-specific Makefile rules.
Feel free to submit subsequent patch, but this bug should be fixed first, improvements can go in later.

Hi Marek,
On Fri, 30 Apr 2021 at 11:47, Marek Vasut marex@denx.de wrote:
On 4/30/21 8:13 PM, Simon Glass wrote:
Hi,
Hello Simon,
On Thu, 29 Apr 2021 at 17:11, Bin Meng bmeng.cn@gmail.com wrote:
On Sat, Apr 24, 2021 at 8:57 PM Marek Vasut marex@denx.de wrote:
On 2/25/21 9:50 PM, Marek Vasut wrote:
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
This bugfix is still missing from upstream.
It seems to be missing a Fixes tag?
There are way too many commits related to this to identify specific one.
Sure, I was suggesting why it had not been picked up for the release.
I can't really comment on this particular patch as it is up to MX8 what is done here.
In that case, deciding on this bugfix is up to the maintainer, Stefano.
But a much better solution is to move this generation stuff to binman, instead of all the arch-specific Makefile rules.
Feel free to submit subsequent patch, but this bug should be fixed first, improvements can go in later.
Yes indeed. It looks like the maintainers are on this thread so they should be able to pick it up.
Regards, Simon

Hi Marek,
On 30.04.21 20:52, Simon Glass wrote:
Hi Marek,
On Fri, 30 Apr 2021 at 11:47, Marek Vasut marex@denx.de wrote:
On 4/30/21 8:13 PM, Simon Glass wrote:
Hi,
Hello Simon,
On Thu, 29 Apr 2021 at 17:11, Bin Meng bmeng.cn@gmail.com wrote:
On Sat, Apr 24, 2021 at 8:57 PM Marek Vasut marex@denx.de wrote:
On 2/25/21 9:50 PM, Marek Vasut wrote:
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
This bugfix is still missing from upstream.
It seems to be missing a Fixes tag?
There are way too many commits related to this to identify specific one.
Sure, I was suggesting why it had not been picked up for the release.
I can't really comment on this particular patch as it is up to MX8 what is done here.
In that case, deciding on this bugfix is up to the maintainer, Stefano.
But a much better solution is to move this generation stuff to binman, instead of all the arch-specific Makefile rules.
Feel free to submit subsequent patch, but this bug should be fixed first, improvements can go in later.
Yes indeed. It looks like the maintainers are on this thread so they should be able to pick it up.
Not sure if this was related to i.MX because it changes the main Makefile, but I admit I do not remember anymore if I have already merged and I found an issue or I have not seen and I ignored. I pick it up and I run CI.
Regards, Stefano

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
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
participants (5)
-
Bin Meng
-
Marek Vasut
-
Simon Glass
-
Stefano Babic
-
stefano.babic@babic.homelinux.org