mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] firmware: Makefile: fix firmware file dependency tracking
@ 2022-12-01 14:54 Marco Felsch
  2022-12-02  9:00 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2022-12-01 14:54 UTC (permalink / raw)
  To: barebox

Commit 663894d99c64 ("firmware: refactor firmware/Makefile") aligned the
barebox code with the kernel code. This commit replaced the usage of
$(fw-external-y) by $(obj-pbl-y) and added the '.gen.o' suffix directly
but didn't adapted the patsubst logic for tracking the binary firmware
files. As result a firmware binary file update is not recognized by make
and and won't make into the final binary. This commit fixes this and so
an update will be recognized automatically without require a 'make
clean' before.

Fixes: 663894d99c64 ("firmware: refactor firmware/Makefile")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 firmware/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/firmware/Makefile b/firmware/Makefile
index f6ff5b831b..da341871d6 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -79,11 +79,11 @@ $(obj)/%.sum: $(obj)/% FORCE
 clean-files += *.sha.bin *.sum
 
 # The .o files depend on the binaries directly; the .S files don't.
-$(patsubst %,$(obj)/%.gen.o, $(obj-pbl-y)): $(obj)/%.gen.o: $(fwdir)/%
+$(patsubst %.gen.o,$(obj)/%.gen.o, $(obj-pbl-y)): $(obj)/%.gen.o: $(fwdir)/%
 
 # The same for pbl:
-$(patsubst %,$(obj)/%.gen.pbl.o, $(obj-pbl-y)): $(obj)/%.gen.pbl.o: $(fwdir)/%
-$(patsubst %,$(obj)/%.extgen.pbl.o, $(pbl-y)): $(obj)/%.extgen.pbl.o: $(fwdir)/%
+$(patsubst %.gen.o,$(obj)/%.gen.pbl.o, $(obj-pbl-y)): $(obj)/%.gen.pbl.o: $(fwdir)/%
+$(patsubst %.gen.o,$(obj)/%.extgen.pbl.o, $(pbl-y)): $(obj)/%.extgen.pbl.o: $(fwdir)/%
 
 pbl-y := $(addsuffix .extgen.o, $(fw-external-y))
 
-- 
2.30.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] firmware: Makefile: fix firmware file dependency tracking
  2022-12-01 14:54 [PATCH] firmware: Makefile: fix firmware file dependency tracking Marco Felsch
@ 2022-12-02  9:00 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-12-02  9:00 UTC (permalink / raw)
  To: Marco Felsch; +Cc: barebox

On Thu, Dec 01, 2022 at 03:54:18PM +0100, Marco Felsch wrote:
> Commit 663894d99c64 ("firmware: refactor firmware/Makefile") aligned the
> barebox code with the kernel code. This commit replaced the usage of
> $(fw-external-y) by $(obj-pbl-y) and added the '.gen.o' suffix directly
> but didn't adapted the patsubst logic for tracking the binary firmware
> files. As result a firmware binary file update is not recognized by make
> and and won't make into the final binary. This commit fixes this and so
> an update will be recognized automatically without require a 'make
> clean' before.
> 
> Fixes: 663894d99c64 ("firmware: refactor firmware/Makefile")
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
>  firmware/Makefile | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Thanks for fixing this. I also was nagged quite a few times by this.

Applied, thanks

Sascha

> 
> diff --git a/firmware/Makefile b/firmware/Makefile
> index f6ff5b831b..da341871d6 100644
> --- a/firmware/Makefile
> +++ b/firmware/Makefile
> @@ -79,11 +79,11 @@ $(obj)/%.sum: $(obj)/% FORCE
>  clean-files += *.sha.bin *.sum
>  
>  # The .o files depend on the binaries directly; the .S files don't.
> -$(patsubst %,$(obj)/%.gen.o, $(obj-pbl-y)): $(obj)/%.gen.o: $(fwdir)/%
> +$(patsubst %.gen.o,$(obj)/%.gen.o, $(obj-pbl-y)): $(obj)/%.gen.o: $(fwdir)/%
>  
>  # The same for pbl:
> -$(patsubst %,$(obj)/%.gen.pbl.o, $(obj-pbl-y)): $(obj)/%.gen.pbl.o: $(fwdir)/%
> -$(patsubst %,$(obj)/%.extgen.pbl.o, $(pbl-y)): $(obj)/%.extgen.pbl.o: $(fwdir)/%
> +$(patsubst %.gen.o,$(obj)/%.gen.pbl.o, $(obj-pbl-y)): $(obj)/%.gen.pbl.o: $(fwdir)/%
> +$(patsubst %.gen.o,$(obj)/%.extgen.pbl.o, $(pbl-y)): $(obj)/%.extgen.pbl.o: $(fwdir)/%
>  
>  pbl-y := $(addsuffix .extgen.o, $(fw-external-y))
>  
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-02  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 14:54 [PATCH] firmware: Makefile: fix firmware file dependency tracking Marco Felsch
2022-12-02  9:00 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox