diff mbox series

[1/2] kbuild: add dtc as dependency on .dtb files

Message ID 20230504122644.958613-1-rasmus.villemoes@prevas.dk
State Accepted
Commit d50af66343f1bb3797e06aa4fabe11f4f61d8ee8
Delegated to: Tom Rini
Headers show
Series [1/2] kbuild: add dtc as dependency on .dtb files | expand

Commit Message

Rasmus Villemoes May 4, 2023, 12:26 p.m. UTC
[Linux commit b8fc5b2157b1]

If dtc is rebuilt, we should rebuild .dtb files with the new dtc.

[Import notes: Back then there was no .dtbo rule in Linux's
Makefile.lib, but the current .dtbo rules in Linux also have the
$(DTC) dependency, so also add it to our .dtbo rule.]

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 scripts/Makefile.lib | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass May 5, 2023, 12:41 a.m. UTC | #1
On Thu, 4 May 2023 at 06:26, Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
>
> [Linux commit b8fc5b2157b1]
>
> If dtc is rebuilt, we should rebuild .dtb files with the new dtc.
>
> [Import notes: Back then there was no .dtbo rule in Linux's
> Makefile.lib, but the current .dtbo rules in Linux also have the
> $(DTC) dependency, so also add it to our .dtbo rule.]
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>  scripts/Makefile.lib | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini May 15, 2023, 9:12 p.m. UTC | #2
On Thu, May 04, 2023 at 02:26:43PM +0200, Rasmus Villemoes wrote:

> [Linux commit b8fc5b2157b1]
> 
> If dtc is rebuilt, we should rebuild .dtb files with the new dtc.
> 
> [Import notes: Back then there was no .dtbo rule in Linux's
> Makefile.lib, but the current .dtbo rules in Linux also have the
> $(DTC) dependency, so also add it to our .dtbo rule.]
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 7b27224b5d..651d700369 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -331,7 +331,7 @@  cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
 		; \
 	sed "s:$(pre-tmp):$(<):" $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 
-$(obj)/%.dtb: $(src)/%.dts FORCE
+$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
 	$(call if_changed_dep,dtc)
 
 pre-tmp = $(subst $(comma),_,$(dot-target).pre.tmp)
@@ -351,7 +351,7 @@  cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
 		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
 	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
 
-$(obj)/%.dtbo: $(src)/%.dts FORCE
+$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE
 	$(call if_changed_dep,dtco)
 
 # Fonts