On Monday 02 November 2020 13:25:56 Patrick DELAUNAY wrote:
> Hi Tom and Pali,
> 
> > From: U-Boot <u-boot-boun...@lists.denx.de> On Behalf Of Tom Rini
> > Sent: samedi 24 octobre 2020 16:52
> > 
> > On Wed, Oct 07, 2020 at 03:39:40PM +0200, Pali Rohár wrote:
> > 
> > > This change fixes two issues when building u-boot-nodtb.bin target:
> > >
> > > * Remove intermediate binary u-boot-nodtb.bin from disk when static_rela
> > >   call (which modifies u-boot-nodtb.bin binary) failed. It is required
> > >   because previous objcopy call creates binary and static_rela finish it.
> > >
> > > * Do not call static_rela cmd when u-boot-nodtb.bin binary was not
> > >   created/updated by previous objcopy call.
> > >
> > > Second fix would ensure that u-boot-nodtb.bin binary is not updated
> > > when all prerequisites were up-to-date. And therefore final binary
> > > u-boot.bin is not updated in case all prerequisites were not modified
> > > and were up-to-date.
> > >
> > > Now running 'make SOURCE_DATE_EPOCH=0 u-boot.bin' second time now
> > does
> > > not touch u-boot.bin binary in case nothing was modified, so GNU make
> > > can correctly detect that everything is up-to-date.
> > >
> > > Signed-off-by: Pali Rohár <p...@kernel.org>
> > > Reviewed-by: Simon Glass <s...@chromium.org>
> > 
> > Applied to u-boot/master, thanks!
> 
> Since this patch is applyied on master branch, I have error when I compile 
> with the verbose option V=1.
> 
> I don't found a correction for this issue until now... except revert this 
> commit.
> 
> For information: I use stm32mp1 platform = ARMv7 32bits
> I have the error:
> 
> scripts/Kbuild.include:220: *** Recursive variable 'echo-cmd' references 
> itself (eventually).  Stop.
> make[1]: *** Waiting for unfinished jobs....
> make -f /local/home/frq07632/views/u-boot/scripts/Makefile.build 
> obj=arch/arm/dts dtbs

Hello Patrick!

Now I was able to trigger this issue, but it seems to be present only
sometimes. Calling make more times hides that issue, so it looks like
something broken in Kconfig dependency generator for Makefiles... Or
maybe something dependent on GNU make...

I played a bit with it and after changing following line in that patch

shell_cmd = { $(echo-cmd) $(cmd_$(1)); }

by

shell_cmd = { $(call echo-cmd,$(1)) $(cmd_$(1)); }

that issue disappeared. But because it triggered on my machine only
sometimes, I do not know if it finally fixes it.

Could you please try this change? And do you have reproducer how to
_always_ trigger it and not only sometimes?

> 
>  
> > --
> > Tom
> 
> Regards
> Patrick

Reply via email to