diff mbox series

[U-Boot,4/4] Revert "Ensure device tree DTS is compiled"

Message ID 1552543116-21868-5-git-send-email-yamada.masahiro@socionext.com
State Accepted
Delegated to: Tom Rini
Headers show
Series Let's write correct arch/*/dts/Makefile | expand

Commit Message

Masahiro Yamada March 14, 2019, 5:58 a.m. UTC
This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.

I am not sure if I correctly understood the log of commit 27cb7300ffda
("Ensure device tree DTS is compiled"), but the code-diff looks like
it was trying to solve the missed re-compilation when .dts was modified.

Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
fixed the issue in a more correct and more complete way.

Anyway, since the former commit, we see a clumsy log like this:

  make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date

Another problem is, it created multiple paths to descend into
arch/*/dts/, causing a race in parallel building.

So, let's revert it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 dts/Makefile | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

Comments

Tom Rini March 22, 2019, 11:18 p.m. UTC | #1
On Thu, Mar 14, 2019 at 02:58:36PM +0900, Masahiro Yamada wrote:

> This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.
> 
> I am not sure if I correctly understood the log of commit 27cb7300ffda
> ("Ensure device tree DTS is compiled"), but the code-diff looks like
> it was trying to solve the missed re-compilation when .dts was modified.
> 
> Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY")
> fixed the issue in a more correct and more complete way.
> 
> Anyway, since the former commit, we see a clumsy log like this:
> 
>   make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date
> 
> Another problem is, it created multiple paths to descend into
> arch/*/dts/, causing a race in parallel building.
> 
> So, let's revert it.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

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

Patch

diff --git a/dts/Makefile b/dts/Makefile
index 4970223..1f83e61 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -10,14 +10,10 @@  ifeq ($(DEVICE_TREE),)
 DEVICE_TREE := unset
 endif
 
-ARCH_PATH := arch/$(ARCH)/dts
-dtb_depends := arch-dtbs
-
 ifneq ($(EXT_DTB),)
 DTB := $(EXT_DTB)
 else
-DTB := $(ARCH_PATH)/$(DEVICE_TREE).dtb
-dtb_depends += $(DTB:.dtb=.dts)
+DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
 endif
 
 $(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
@@ -28,10 +24,7 @@  $(obj)/dt.dtb: $(DTB) FORCE
 
 targets += dt.dtb dt-spl.dtb
 
-$(DTB): $(dtb_depends)
-ifeq ($(EXT_DTB),)
-	$(Q)$(MAKE) $(build)=$(ARCH_PATH) $@
-endif
+$(DTB): arch-dtbs
 	$(Q)test -e $@ || (						\
 	echo >&2;							\
 	echo >&2 "Device Tree Source is not correctly specified.";	\
@@ -42,7 +35,7 @@  endif
 
 PHONY += arch-dtbs
 arch-dtbs:
-	$(Q)$(MAKE) $(build)=$(ARCH_PATH) dtbs
+	$(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs
 
 ifeq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o