Skip to contentSkip to conversation

dts: Deduplicate dtbs target

PATCH Superseded Marek Vasut 4 participants 15 messages Sep 27, 2024 – Oct 5, 2024

Subsystems (14)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dts: Deduplicate dtbs target

The dtbs: target is almost identical in all architecture Makefiles. All architecture Makefiles include scripts/Makefile.dts . Deduplicate the dtbs: target into scripts/Makefile.dts . No functional change.

---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Caleb Connolly <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Lothar Rubusch <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 arch/arc/dts/Makefile            | 9 +--------
 arch/arm/dts/Makefile            | 8 --------
 arch/m68k/dts/Makefile           | 9 +--------
 arch/microblaze/dts/Makefile     | 9 +--------
 arch/mips/dts/Makefile           | 8 --------
 arch/nios2/dts/Makefile          | 9 +--------
 arch/powerpc/dts/Makefile        | 8 --------
 arch/riscv/dts/Makefile          | 9 +--------
 arch/sandbox/dts/Makefile        | 9 +--------
 arch/sh/dts/Makefile             | 8 --------
 arch/x86/dts/Makefile            | 8 --------
 arch/xtensa/dts/Makefile         | 8 --------
 dts/upstream/src/arm/Makefile    | 8 --------
 dts/upstream/src/arm64/Makefile  | 8 --------
 dts/upstream/src/xtensa/Makefile | 8 --------
 scripts/Makefile.dts             | 8 ++++++++
 16 files changed, 14 insertions(+), 120 deletions(-)
arch/arc/dts/Makefile +1 -8
index 532a8131c59..fe6ad7b849a 100644
@@ -10,12 +10,5 @@ dtb-$(CONFIG_TARGET_IOT_DEVKIT) +=  iot_devkit.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/arm/dts/Makefile +0 -8
index cdb90f1d358..5976ebd09fc 100644
@@ -1304,16 +1304,8 @@ dtb-$(CONFIG_TARGET_CORSTONE1000) += corstone1000-mps3.dtb \
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
 
 DTC_FLAGS_imx8mp-dhcom-som-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
 DTC_FLAGS_imx8mp-dhcom-pdk3-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *.dtbo *_HS
arch/m68k/dts/Makefile +1 -8
index 7988522eb98..8b354b9c570 100644
@@ -20,12 +20,5 @@ dtb-$(CONFIG_TARGET_STMARK2) += stmark2.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/microblaze/dts/Makefile +1 -8
index 427a8f9aaca..9be902d3bb1 100644
@@ -4,12 +4,5 @@ dtb-y += $(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)).dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/mips/dts/Makefile +0 -8
index 14fbce597b9..752e771514f 100644
@@ -39,13 +39,5 @@ dtb-$(CONFIG_SOC_SERVAL) += serval_pcb105.dtb serval_pcb106.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/nios2/dts/Makefile +1 -8
index 2b29fa90f6c..d77db9762a1 100644
@@ -4,12 +4,5 @@ dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/powerpc/dts/Makefile +0 -8
index 321c644804e..766b0c05951 100644
@@ -35,13 +35,5 @@ dtb-$(CONFIG_TARGET_CMPCPRO) += cmpcpro.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/riscv/dts/Makefile +1 -8
index c4c44057bad..f3dfd751cb4 100644
@@ -15,12 +15,5 @@ dtb-$(CONFIG_TARGET_ASPEED_AST2700_IBEX) += ast2700-ibex.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/sandbox/dts/Makefile +1 -8
index f810b4752f5..1c9fb4a4566 100644
@@ -10,12 +10,5 @@ dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *.dtbo
arch/sh/dts/Makefile +0 -8
index 144fd3e7d22..e9153e42534 100644
@@ -2,13 +2,5 @@ dtb-y += sh7751-r2dplus.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *_HS
arch/x86/dts/Makefile +0 -8
index cd77f4c4e81..9a46726e026 100644
@@ -24,12 +24,4 @@ dtb-y += bayleybay.dtb \
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 DTC_FLAGS += -R 4 -p $(if $(CONFIG_EFI_APP),0x8000,0x1000)
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/xtensa/dts/Makefile +0 -8
index c22c50ac4e5..aa582b85e5c 100644
@@ -4,12 +4,4 @@ dtb-$(CONFIG_XTENSA) += ml605.dtb ml605_nommu.dtb kc705.dtb kc705_nommu.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
dts/upstream/src/arm/Makefile +0 -8
index 9a8f6aa3584..c86a2be5d85 100644
@@ -2,13 +2,5 @@
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := */*.dtb */*.dtbo
dts/upstream/src/arm64/Makefile +0 -8
index 26a83d3d29d..b6db0dc6b26 100644
@@ -2,17 +2,9 @@
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
 
 ifdef CONFIG_RCAR_64
 DTC_FLAGS += -R 4 -p 0x1000
 endif
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := */*.dtb */*.dtbo
dts/upstream/src/xtensa/Makefile +0 -8
index 2a81acb32bc..c86a2be5d85 100644
@@ -2,13 +2,5 @@
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *.dtbo */*.dtb */*.dtbo
scripts/Makefile.dts +8 -0
index 790f3c508f1..1fe142f2bbf 100644
@@ -14,3 +14,11 @@ dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFI
 dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts))
 
 endif
+
+targets += $(dtb-y)
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+	@:
+
+clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS
Signature · 1 line
2.45.2
#1 lore raw

PATCH 2/3 dts: Add ability to build DTOs only from arch/$(ARCH)/dts

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

Add dedicated 'dtbos' target which builds only .dtbos and not .dtbs and in case OF_UPSTREAM is enabled, build this target for arch/$(ARCH)/dtb to generate local U-Boot specific DTBOs.

Adjust top level Makefile so binman would search for .dtb and .dtbo in both OF_UPSTREAM specific paths and arch/$(ARCH)/dtb for the .dtbo case.

---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Caleb Connolly <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Lothar Rubusch <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 Makefile             |  5 ++++-
 dts/Makefile         | 11 +++++++++--
 scripts/Makefile.dts |  5 ++++-
 3 files changed, 17 insertions(+), 4 deletions(-)
Makefile +4 -1
index 525576f987d..fba8e48681e 100644
@@ -1194,6 +1194,8 @@ else
 dt_dir := arch/$(ARCH)/dts
 endif
 
+local_dto_dir := arch/$(ARCH)/dts
+
 ifeq ($(CONFIG_MULTI_DTB_FIT),y)
 
 ifeq ($(CONFIG_MULTI_DTB_FIT_LZO),y)
@@ -1377,7 +1379,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
 		build -u -d u-boot.dtb -O . -m \
 		--allow-missing $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
 		-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
-		-I $(dt_dir) -a of-list=$(CONFIG_OF_LIST) \
+		-I $(dt_dir) -I $(local_dto_dir) \
+		-a of-list=$(CONFIG_OF_LIST) \
 		$(foreach f,$(BINMAN_INDIRS),-I $(f)) \
 		-a atf-bl31-path=${BL31} \
 		-a tee-os-path=${TEE} \
dts/Makefile +9 -2
index d6c2c9daf31..f872a867667 100644
@@ -11,12 +11,16 @@ DEVICE_TREE := unset
 endif
 
 ifeq ($(CONFIG_OF_UPSTREAM),y)
+local_dtbos := local-dtbos
+local_dtbo_dir := arch/$(ARCH)/dts
 ifeq ($(CONFIG_ARM64),y)
 dt_dir := dts/upstream/src/arm64
 else
 dt_dir := dts/upstream/src/$(ARCH)
 endif
 else
+local_dtbos :=
+local_dtbo_dir :=
 dt_dir := arch/$(ARCH)/dts
 endif
 
@@ -40,7 +44,7 @@ endif
 
 targets += dt.dtb
 
-$(DTB): arch-dtbs
+$(DTB): arch-dtbs $(local_dtbos)
 	$(Q)test -e $@ || (						\
 	echo >&2;							\
 	echo >&2 "Device Tree Source ($@) is not correctly specified.";	\
@@ -49,10 +53,13 @@ $(DTB): arch-dtbs
 	echo >&2;							\
 	/bin/false)
 
-PHONY += arch-dtbs
+PHONY += arch-dtbs local-dtbos
 arch-dtbs:
 	$(Q)$(MAKE) $(build)=$(dt_dir) dtbs
 
+local-dtbos:
+	$(Q)$(MAKE) $(build)=$(local_dtbo_dir) dtbos
+
 ifeq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
 # support "out-of-tree" build for dtb-spl
scripts/Makefile.dts +4 -1
index 1fe142f2bbf..f4d3a37010a 100644
@@ -17,8 +17,11 @@ endif
 
 targets += $(dtb-y)
 
-PHONY += dtbs
+PHONY += dtbs dtbos
 dtbs: $(addprefix $(obj)/, $(dtb-y))
 	@:
 
+dtbos: $(addprefix $(obj)/, $(filter-out %.dtb,$(dtb-y)))
+	@:
+
 clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS
Signature · 1 line
2.45.2
#2 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

+ Jan

Hi Marek,

Quoted 5 lines · Marek Vasut

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

I would like to understand the need to maintain DTBOs separately from DTBs. Why aren't we pushing DTBOs to Linux kernel sources as we do for DTBs? Jan recently pushed those so-called U-Boot specific DTBOs for a TI platform which were accepted in the Linux kernel upstream. This patch will just deny the ability to build those DTBOs from dts upstream tree. IMHO, this takes a step backwards on the whole notion of OF_UPSTREAM.

If we really want a middle ground solution to allow migration to OF_UPSTREAM easier then we need to find a way to build DTBOs from both directories (local and upstream dts). I would imagine that will likely complicate building and packaging DTBOs.

-Sumit

Quoted 120 lines

Add dedicated 'dtbos' target which builds only .dtbos and not .dtbs and in case OF_UPSTREAM is enabled, build this target for arch/$(ARCH)/dtb to generate local U-Boot specific DTBOs.

Adjust top level Makefile so binman would search for .dtb and .dtbo in both OF_UPSTREAM specific paths and arch/$(ARCH)/dtb for the .dtbo case.

---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Caleb Connolly <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Lothar Rubusch <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 Makefile             |  5 ++++-
 dts/Makefile         | 11 +++++++++--
 scripts/Makefile.dts |  5 ++++-
 3 files changed, 17 insertions(+), 4 deletions(-)
Makefile +4 -1
index 525576f987d..fba8e48681e 100644
@@ -1194,6 +1194,8 @@ else
 dt_dir := arch/$(ARCH)/dts
 endif
 
+local_dto_dir := arch/$(ARCH)/dts
+
 ifeq ($(CONFIG_MULTI_DTB_FIT),y)
 
 ifeq ($(CONFIG_MULTI_DTB_FIT_LZO),y)
@@ -1377,7 +1379,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
                build -u -d u-boot.dtb -O . -m \
                --allow-missing $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
                -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
-               -I $(dt_dir) -a of-list=$(CONFIG_OF_LIST) \
+               -I $(dt_dir) -I $(local_dto_dir) \
+               -a of-list=$(CONFIG_OF_LIST) \
                $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
                -a atf-bl31-path=${BL31} \
                -a tee-os-path=${TEE} \
dts/Makefile +9 -2
index d6c2c9daf31..f872a867667 100644
@@ -11,12 +11,16 @@ DEVICE_TREE := unset
 endif
 
 ifeq ($(CONFIG_OF_UPSTREAM),y)
+local_dtbos := local-dtbos
+local_dtbo_dir := arch/$(ARCH)/dts
 ifeq ($(CONFIG_ARM64),y)
 dt_dir := dts/upstream/src/arm64
 else
 dt_dir := dts/upstream/src/$(ARCH)
 endif
 else
+local_dtbos :=
+local_dtbo_dir :=
 dt_dir := arch/$(ARCH)/dts
 endif
 
@@ -40,7 +44,7 @@ endif
 
 targets += dt.dtb
 
-$(DTB): arch-dtbs
+$(DTB): arch-dtbs $(local_dtbos)
        $(Q)test -e $@ || (                                             \
        echo >&2;                                                       \
        echo >&2 "Device Tree Source ($@) is not correctly specified."; \
@@ -49,10 +53,13 @@ $(DTB): arch-dtbs
        echo >&2;                                                       \
        /bin/false)
 
-PHONY += arch-dtbs
+PHONY += arch-dtbs local-dtbos
 arch-dtbs:
        $(Q)$(MAKE) $(build)=$(dt_dir) dtbs
 
+local-dtbos:
+       $(Q)$(MAKE) $(build)=$(local_dtbo_dir) dtbos
+
 ifeq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
 # support "out-of-tree" build for dtb-spl
scripts/Makefile.dts +4 -2
index 1fe142f2bbf..f4d3a37010a 100644
@@ -17,8 +17,11 @@ endif
 
 targets += $(dtb-y)
 
-PHONY += dtbs
+PHONY += dtbs dtbos
 dtbs: $(addprefix $(obj)/, $(dtb-y))
        @:
 
+dtbos: $(addprefix $(obj)/, $(filter-out %.dtb,$(dtb-y)))
+       @:
+
 clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS
--

2.45.2

#3 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

Quoted 11 lines · Sumit Garg

+ Jan

Hi Marek,

Quoted 5 lines · Marek Vasut

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

Quoted 7 lines

I would like to understand the need to maintain DTBOs separately from DTBs. Why aren't we pushing DTBOs to Linux kernel sources as we do for DTBs? Jan recently pushed those so-called U-Boot specific DTBOs for a TI platform which were accepted in the Linux kernel upstream. This patch will just deny the ability to build those DTBOs from dts upstream tree. IMHO, this takes a step backwards on the whole notion of OF_UPSTREAM.

Exactly - I was sent the other direction (get DTSOs upstream), and I'm now only waiting for 6.12-rc1-dts so that the first round to make use of that can be integrated into U-Boot [1]. Anything that would prevent that here is not welcome anymore.

Quoted 5 lines

If we really want a middle ground solution to allow migration to OF_UPSTREAM easier then we need to find a way to build DTBOs from both directories (local and upstream dts). I would imagine that will likely complicate building and packaging DTBOs.

I tried that, and I got the clear signal that it is not desired.

Jan

[1] https://github.com/siemens/u-boot/commits/jan/iot2050

Quoted 123 lines

-Sumit

Quoted 120 lines

Add dedicated 'dtbos' target which builds only .dtbos and not .dtbs and in case OF_UPSTREAM is enabled, build this target for arch/$(ARCH)/dtb to generate local U-Boot specific DTBOs.

Adjust top level Makefile so binman would search for .dtb and .dtbo in both OF_UPSTREAM specific paths and arch/$(ARCH)/dtb for the .dtbo case.

---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Caleb Connolly <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Lothar Rubusch <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 Makefile             |  5 ++++-
 dts/Makefile         | 11 +++++++++--
 scripts/Makefile.dts |  5 ++++-
 3 files changed, 17 insertions(+), 4 deletions(-)
Makefile +4 -1
index 525576f987d..fba8e48681e 100644
@@ -1194,6 +1194,8 @@ else
 dt_dir := arch/$(ARCH)/dts
 endif
 
+local_dto_dir := arch/$(ARCH)/dts
+
 ifeq ($(CONFIG_MULTI_DTB_FIT),y)
 
 ifeq ($(CONFIG_MULTI_DTB_FIT_LZO),y)
@@ -1377,7 +1379,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
                build -u -d u-boot.dtb -O . -m \
                --allow-missing $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
                -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
-               -I $(dt_dir) -a of-list=$(CONFIG_OF_LIST) \
+               -I $(dt_dir) -I $(local_dto_dir) \
+               -a of-list=$(CONFIG_OF_LIST) \
                $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
                -a atf-bl31-path=${BL31} \
                -a tee-os-path=${TEE} \
dts/Makefile +9 -2
index d6c2c9daf31..f872a867667 100644
@@ -11,12 +11,16 @@ DEVICE_TREE := unset
 endif
 
 ifeq ($(CONFIG_OF_UPSTREAM),y)
+local_dtbos := local-dtbos
+local_dtbo_dir := arch/$(ARCH)/dts
 ifeq ($(CONFIG_ARM64),y)
 dt_dir := dts/upstream/src/arm64
 else
 dt_dir := dts/upstream/src/$(ARCH)
 endif
 else
+local_dtbos :=
+local_dtbo_dir :=
 dt_dir := arch/$(ARCH)/dts
 endif
 
@@ -40,7 +44,7 @@ endif
 
 targets += dt.dtb
 
-$(DTB): arch-dtbs
+$(DTB): arch-dtbs $(local_dtbos)
        $(Q)test -e $@ || (                                             \
        echo >&2;                                                       \
        echo >&2 "Device Tree Source ($@) is not correctly specified."; \
@@ -49,10 +53,13 @@ $(DTB): arch-dtbs
        echo >&2;                                                       \
        /bin/false)
 
-PHONY += arch-dtbs
+PHONY += arch-dtbs local-dtbos
 arch-dtbs:
        $(Q)$(MAKE) $(build)=$(dt_dir) dtbs
 
+local-dtbos:
+       $(Q)$(MAKE) $(build)=$(local_dtbo_dir) dtbos
+
 ifeq ($(CONFIG_SPL_BUILD),y)
 obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
 # support "out-of-tree" build for dtb-spl
scripts/Makefile.dts +4 -2
index 1fe142f2bbf..f4d3a37010a 100644
@@ -17,8 +17,11 @@ endif
 
 targets += $(dtb-y)
 
-PHONY += dtbs
+PHONY += dtbs dtbos
 dtbs: $(addprefix $(obj)/, $(dtb-y))
        @:
 
+dtbos: $(addprefix $(obj)/, $(filter-out %.dtb,$(dtb-y)))
+       @:
+
 clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS
--

2.45.2

Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
#4 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

Quoted 20 lines · Jan Kiszka
Quoted 11 lines · Sumit Garg

+ Jan

Hi Marek,

Quoted 5 lines · Marek Vasut

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

Quoted 7 lines

I would like to understand the need to maintain DTBOs separately from DTBs. Why aren't we pushing DTBOs to Linux kernel sources as we do for DTBs? Jan recently pushed those so-called U-Boot specific DTBOs for a TI platform which were accepted in the Linux kernel upstream. This patch will just deny the ability to build those DTBOs from dts upstream tree. IMHO, this takes a step backwards on the whole notion of OF_UPSTREAM.

Quoted 4 lines

Exactly - I was sent the other direction (get DTSOs upstream), and I'm now only waiting for 6.12-rc1-dts so that the first round to make use of that can be integrated into U-Boot [1]. Anything that would prevent that here is not welcome anymore.

I will only re-iterate what I wrote on my previous email, this commit does not prevent building DTBOs from dts/upstream/ , they are preferred. This only adds fallback to U-Boot local DTOs if the upstream DTOs are not upstream yet.

Quoted 6 lines
Quoted 4 lines

If we really want a middle ground solution to allow migration to OF_UPSTREAM easier then we need to find a way to build DTBOs from both directories (local and upstream dts). I would imagine that will likely complicate building and packaging DTBOs.

I tried that, and I got the clear signal that it is not desired.

Is there a link to a discussion ?

#5 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

In reply to Sumit Garg
Quoted 3 lines · Sumit Garg

+ Jan

Hi Marek,

Hi,

Quoted 10 lines · Marek Vasut
Quoted 5 lines

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

I would like to understand the need to maintain DTBOs separately from DTBs. Why aren't we pushing DTBOs to Linux kernel sources as we do for DTBs?

This is a stopgap measure, I would like to start reducing the amount of U-Boot DTs for iMX platforms, but the DTBOs are still in U-Boot only, so I would like to have some middle-of-the-road solution until the DTOs get upstreamed to Linux too.

Quoted 5 lines

Jan recently pushed those so-called U-Boot specific DTBOs for a TI platform which were accepted in the Linux kernel upstream. This patch will just deny the ability to build those DTBOs from dts upstream tree. IMHO, this takes a step backwards on the whole notion of OF_UPSTREAM.

I don't think this will deny building those DTOs which are already upstream. With OF_UPSTREAM enabled, this will build:
- Upstream DTBs
- Upstream DTBOs
- U-Boot local DTBOs (and NOT U-Boot local DTBs)
The DTs that are bundled into u-boot.itb are searched exactly in that order too, upstream ones first, upstream DTBOs second and finally the U-Boot local DTBOs. The upstream content should always get higher priority if there are any leftover DTBOs in U-Boot which are also upstream.

Quoted 4 lines

If we really want a middle ground solution to allow migration to OF_UPSTREAM easier then we need to find a way to build DTBOs from both directories (local and upstream dts). I would imagine that will likely complicate building and packaging DTBOs.

I believe this is exactly what this commit does ?

#6 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

Quoted 40 lines · Marek Vasut
Quoted 3 lines · Sumit Garg

+ Jan

Hi Marek,

Hi,

Quoted 10 lines · Marek Vasut
Quoted 5 lines

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

I would like to understand the need to maintain DTBOs separately from DTBs. Why aren't we pushing DTBOs to Linux kernel sources as we do for DTBs?

This is a stopgap measure, I would like to start reducing the amount of U-Boot DTs for iMX platforms, but the DTBOs are still in U-Boot only, so I would like to have some middle-of-the-road solution until the DTOs get upstreamed to Linux too.

Quoted 5 lines

Jan recently pushed those so-called U-Boot specific DTBOs for a TI platform which were accepted in the Linux kernel upstream. This patch will just deny the ability to build those DTBOs from dts upstream tree. IMHO, this takes a step backwards on the whole notion of OF_UPSTREAM.

I don't think this will deny building those DTOs which are already upstream. With OF_UPSTREAM enabled, this will build:
- Upstream DTBs
- Upstream DTBOs
- U-Boot local DTBOs (and NOT U-Boot local DTBs)
The DTs that are bundled into u-boot.itb are searched exactly in that order too, upstream ones first, upstream DTBOs second and finally the U-Boot local DTBOs. The upstream content should always get higher priority if there are any leftover DTBOs in U-Boot which are also upstream.

Quoted 6 lines
Quoted 4 lines

If we really want a middle ground solution to allow migration to OF_UPSTREAM easier then we need to find a way to build DTBOs from both directories (local and upstream dts). I would imagine that will likely complicate building and packaging DTBOs.

I believe this is exactly what this commit does ?

Okay I see, probably the commit subject was too confusing for me:

"dts: Add ability to build DTOs only from arch/$(ARCH)/dts"

I can see the benefit that it provides to people migrating to OF_UPSTREAM. The negative part can be people just not pushing the DTBOs upstream which should rather be easier as we have seen Jan pushing DTBOs upstream. There is also magic added by this patch regarding which DTBO is actually being used (local or upstream one), the packaging ordering can be magic to someone debugging a boot issue on a particular platform.

IMHO, the OF_UPSTREAM migration can wait until all the required DT sources (.dts and .dtso) are present upstream. If we start to mix and match DT sources then it is going to turn into maintainers' hardship again. However, I am still open to further convincing arguments for this.

-Sumit

#7 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

On 10/1/24 3:35 PM, Sumit Garg wrote:

Hi,

Quoted 39 lines
Quoted 32 lines
Quoted 10 lines · Marek Vasut
Quoted 5 lines

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

I would like to understand the need to maintain DTBOs separately from DTBs. Why aren't we pushing DTBOs to Linux kernel sources as we do for DTBs?

This is a stopgap measure, I would like to start reducing the amount of U-Boot DTs for iMX platforms, but the DTBOs are still in U-Boot only, so I would like to have some middle-of-the-road solution until the DTOs get upstreamed to Linux too.

Quoted 5 lines

Jan recently pushed those so-called U-Boot specific DTBOs for a TI platform which were accepted in the Linux kernel upstream. This patch will just deny the ability to build those DTBOs from dts upstream tree. IMHO, this takes a step backwards on the whole notion of OF_UPSTREAM.

I don't think this will deny building those DTOs which are already upstream. With OF_UPSTREAM enabled, this will build:
- Upstream DTBs
- Upstream DTBOs
- U-Boot local DTBOs (and NOT U-Boot local DTBs)
The DTs that are bundled into u-boot.itb are searched exactly in that order too, upstream ones first, upstream DTBOs second and finally the U-Boot local DTBOs. The upstream content should always get higher priority if there are any leftover DTBOs in U-Boot which are also upstream.

Quoted 6 lines
Quoted 4 lines

If we really want a middle ground solution to allow migration to OF_UPSTREAM easier then we need to find a way to build DTBOs from both directories (local and upstream dts). I would imagine that will likely complicate building and packaging DTBOs.

I believe this is exactly what this commit does ?

Quoted 8 lines

Okay I see, probably the commit subject was too confusing for me:

"dts: Add ability to build DTOs only from arch/$(ARCH)/dts"

I can see the benefit that it provides to people migrating to OF_UPSTREAM. The negative part can be people just not pushing the DTBOs upstream which should rather be easier as we have seen Jan pushing DTBOs upstream.

That (push your stuff upstream, reduce the duplication in U-Boot) is up to maintainers to request.

Strictly enforcing either/or means setting the entry bar to OF_UPSTREAM higher than the entry bar to Linux kernel, which is not gonna work.

Giving contributors some middle-of-the-road solution might in fact expedite the switch to OF_UPSTREAM, even if it may not happen all at once.

Quoted 4 lines

There is also magic added by this patch
regarding which DTBO is actually being used (local or upstream one), the packaging ordering can be magic to someone debugging a boot issue on a particular platform.

See discussion above, the ordering is well defined.

Quoted 5 lines

IMHO, the OF_UPSTREAM migration can wait until all the required DT sources (.dts and .dtso) are present upstream. If we start to mix and match DT sources then it is going to turn into maintainers' hardship again. However, I am still open to further convincing arguments for this.

With some Linux kernel architectures, it takes months to get a singular patch review out of the maintainers. For systems which already have DTs upstream and only have DTOs left, the OF_UPSTREAM conversion and DTO upstreaming can be done in parallel, hence expedite the process.

#8 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

Quoted 69 lines · Marek Vasut

On 10/1/24 3:35 PM, Sumit Garg wrote:

Hi,

Quoted 39 lines
Quoted 32 lines
Quoted 10 lines · Marek Vasut
Quoted 5 lines

Currently the enablement of OF_UPSTREAM results on the build system searching for DTs only in dts/upstream/ . There are platforms which use U-Boot specific DTBOs applied on top of U-Boot control DT during SPL stage, and source DTs for these are located in arch/$(ARCH)/dtb.

I would like to understand the need to maintain DTBOs separately from DTBs. Why aren't we pushing DTBOs to Linux kernel sources as we do for DTBs?

This is a stopgap measure, I would like to start reducing the amount of U-Boot DTs for iMX platforms, but the DTBOs are still in U-Boot only, so I would like to have some middle-of-the-road solution until the DTOs get upstreamed to Linux too.

Quoted 5 lines

Jan recently pushed those so-called U-Boot specific DTBOs for a TI platform which were accepted in the Linux kernel upstream. This patch will just deny the ability to build those DTBOs from dts upstream tree. IMHO, this takes a step backwards on the whole notion of OF_UPSTREAM.

I don't think this will deny building those DTOs which are already upstream. With OF_UPSTREAM enabled, this will build:
- Upstream DTBs
- Upstream DTBOs
- U-Boot local DTBOs (and NOT U-Boot local DTBs)
The DTs that are bundled into u-boot.itb are searched exactly in that order too, upstream ones first, upstream DTBOs second and finally the U-Boot local DTBOs. The upstream content should always get higher priority if there are any leftover DTBOs in U-Boot which are also upstream.

Quoted 6 lines
Quoted 4 lines

If we really want a middle ground solution to allow migration to OF_UPSTREAM easier then we need to find a way to build DTBOs from both directories (local and upstream dts). I would imagine that will likely complicate building and packaging DTBOs.

I believe this is exactly what this commit does ?

Quoted 8 lines

Okay I see, probably the commit subject was too confusing for me:

"dts: Add ability to build DTOs only from arch/$(ARCH)/dts"

I can see the benefit that it provides to people migrating to OF_UPSTREAM. The negative part can be people just not pushing the DTBOs upstream which should rather be easier as we have seen Jan pushing DTBOs upstream.

That (push your stuff upstream, reduce the duplication in U-Boot) is up to maintainers to request.

Strictly enforcing either/or means setting the entry bar to OF_UPSTREAM higher than the entry bar to Linux kernel, which is not gonna work.

Giving contributors some middle-of-the-road solution might in fact expedite the switch to OF_UPSTREAM, even if it may not happen all at once.

Quoted 4 lines

There is also magic added by this patch
regarding which DTBO is actually being used (local or upstream one), the packaging ordering can be magic to someone debugging a boot issue on a particular platform.

See discussion above, the ordering is well defined.

Quoted 7 lines
Quoted 5 lines

IMHO, the OF_UPSTREAM migration can wait until all the required DT sources (.dts and .dtso) are present upstream. If we start to mix and match DT sources then it is going to turn into maintainers' hardship again. However, I am still open to further convincing arguments for this.

With some Linux kernel architectures, it takes months to get a singular patch review out of the maintainers.

Okay I see the pain but we already have that rule for .dts files for OF_UPSTREAM switch but having a different rule for .dtso files is going to make maintainability complex. The Linux kernel sub-architecture maintainers remain the same for both .dts and .dtso files.

Quoted 3 lines

For systems which already have DTs
upstream and only have DTOs left, the OF_UPSTREAM conversion and DTO upstreaming can be done in parallel, hence expedite the process.

Fair enough, let's try to find a middle ground to gate the local DTOs behind a config to make the use of local DTOs explicit. How about CONFIG_OF_UPSTREAM_LOCAL_DTOS?

-Sumit

#9 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

On 10/3/24 9:58 AM, Sumit Garg wrote:

[...]

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

IMHO, the OF_UPSTREAM migration can wait until all the required DT sources (.dts and .dtso) are present upstream. If we start to mix and match DT sources then it is going to turn into maintainers' hardship again. However, I am still open to further convincing arguments for this.

With some Linux kernel architectures, it takes months to get a singular patch review out of the maintainers.

Okay I see the pain but we already have that rule for .dts files for OF_UPSTREAM switch but having a different rule for .dtso files is going to make maintainability complex.

What kind of rule is that ?

If the rule for .dts files is either dts/upstream or arch/*/dts, then the rule for .dtso is either dts/upstream+fallback to arch/*/dts or only arch/*/dts .

Quoted 3 lines

The Linux kernel
sub-architecture maintainers remain the same for both .dts and .dtso files.

Well, yes.

Quoted 7 lines
Quoted 3 lines

For systems which already have DTs
upstream and only have DTOs left, the OF_UPSTREAM conversion and DTO upstreaming can be done in parallel, hence expedite the process.

Fair enough, let's try to find a middle ground to gate the local DTOs behind a config to make the use of local DTOs explicit. How about CONFIG_OF_UPSTREAM_LOCAL_DTOS?

Do you think another Kconfig option is really necessary ? I don't mind adding one if you think that would make a difference, but I don't see it as strictly necessary.

#10 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

Quoted 17 lines · Marek Vasut

On 10/3/24 9:58 AM, Sumit Garg wrote:

[...]

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

IMHO, the OF_UPSTREAM migration can wait until all the required DT sources (.dts and .dtso) are present upstream. If we start to mix and match DT sources then it is going to turn into maintainers' hardship again. However, I am still open to further convincing arguments for this.

With some Linux kernel architectures, it takes months to get a singular patch review out of the maintainers.

Okay I see the pain but we already have that rule for .dts files for OF_UPSTREAM switch but having a different rule for .dtso files is going to make maintainability complex.

Quoted 5 lines

What kind of rule is that ?

If the rule for .dts files is either dts/upstream or arch/*/dts, then the rule for .dtso is either dts/upstream+fallback to arch/*/dts or only arch/*/dts .

Yeah that the rule difference we will have after this patch for .dtso but I can live with that given it being gated behind the Kconfig option below.

Quoted 11 lines
Quoted 4 lines

The Linux kernel
sub-architecture maintainers remain the same for both .dts and .dtso files.

Well, yes.

Quoted 4 lines
Quoted 3 lines

For systems which already have DTs
upstream and only have DTOs left, the OF_UPSTREAM conversion and DTO upstreaming can be done in parallel, hence expedite the process.

Quoted 6 lines
Quoted 3 lines

Fair enough, let's try to find a middle ground to gate the local DTOs behind a config to make the use of local DTOs explicit. How about CONFIG_OF_UPSTREAM_LOCAL_DTOS?

Do you think another Kconfig option is really necessary ? I don't mind adding one if you think that would make a difference, but I don't see it as strictly necessary.

Yeah I think it will make explicit the usage of local DTOs vs upstream DTOs.

-Sumit

#11 lore raw

Re: [PATCH 2/3] dts: Add ability to build DTOs only from arch/$(ARCH)/dts

Quoted 20 lines · Sumit Garg
Quoted 19 lines · Marek Vasut

On 10/3/24 9:58 AM, Sumit Garg wrote:

[...]

Quoted 11 lines
Quoted 7 lines
Quoted 5 lines

IMHO, the OF_UPSTREAM migration can wait until all the required DT sources (.dts and .dtso) are present upstream. If we start to mix and match DT sources then it is going to turn into maintainers' hardship again. However, I am still open to further convincing arguments for this.

With some Linux kernel architectures, it takes months to get a singular patch review out of the maintainers.

Okay I see the pain but we already have that rule for .dts files for OF_UPSTREAM switch but having a different rule for .dtso files is going to make maintainability complex.

What kind of rule is that ?

Quoted 7 lines
Quoted 3 lines

If the rule for .dts files is either dts/upstream or arch/*/dts, then the rule for .dtso is either dts/upstream+fallback to arch/*/dts or only arch/*/dts .

Yeah that the rule difference we will have after this patch for .dtso but I can live with that given it being gated behind the Kconfig option below.

Should be fixed in V2.

#12 lore raw

PATCH 3/3 arm64: dts: imx: Switch to using upstream DT on DH i.MX8MP DHCOM PDK2/PDK3

In reply to Marek Vasut

Enable OF_UPSTREAM to use upstream DT and add freescale/ prefix to the DEFAULT_DEVICE_TREE. And thereby directly build DTB from dts/upstream/src/ including *-u-boot.dtsi and DTBOs from arch/$(ARCH)/dts/ directory.

---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Caleb Connolly <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Lothar Rubusch <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 arch/arm/dts/Makefile               |   2 -
 arch/arm/dts/imx8mp-dhcom-pdk2.dts  | 158 --------------
 arch/arm/dts/imx8mp-dhcom-pdk3.dts  | 317 ----------------------------
 configs/imx8mp_dhcom_pdk2_defconfig |   5 +-
 configs/imx8mp_dhcom_pdk3_defconfig |   5 +-
 5 files changed, 6 insertions(+), 481 deletions(-)
 delete mode 100644 arch/arm/dts/imx8mp-dhcom-pdk2.dts
 delete mode 100644 arch/arm/dts/imx8mp-dhcom-pdk3.dts
arch/arm/dts/Makefile +0 -2
index 5976ebd09fc..58eec61b1b2 100644
@@ -969,8 +969,6 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
 	imx8mp-dhcom-pdk-overlay-eth2xfast.dtbo \
 	imx8mp-debix-model-a.dtb \
 	imx8mp-dhcom-drc02.dtb \
-	imx8mp-dhcom-pdk2.dtb \
-	imx8mp-dhcom-pdk3.dtb \
 	imx8mp-dhcom-pdk3-overlay-rev100.dtbo \
 	imx8mp-icore-mx8mp-edimm2.2.dtb \
 	imx8mp-msc-sm2s.dtb \
arch/arm/dts/imx8mp-dhcom-pdk2.dts deleted +0 -158

158 lines not on this page · raw message

arch/arm/dts/imx8mp-dhcom-pdk3.dts deleted +0 -317

317 lines not on this page · raw message

configs/imx8mp_dhcom_pdk2_defconfig +3 -2
index f807b0cfc37..b2d15cd2771 100644
@@ -12,7 +12,7 @@ CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0xFE0000
 CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="imx8mp-dhcom-pdk2"
+CONFIG_DEFAULT_DEVICE_TREE="freescale/imx8mp-dhcom-pdk2"
 CONFIG_SPL_TEXT_BASE=0x920000
 CONFIG_TARGET_IMX8MP_DH_DHCOM_PDK2=y
 CONFIG_DM_RESET=y
@@ -48,7 +48,7 @@ CONFIG_USE_BOOTARGS=y
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run dh_update_env distro_bootcmd ; reset"
 CONFIG_USE_PREBOOT=y
-CONFIG_DEFAULT_FDT_FILE="imx8mp-dhcom-pdk2.dtb"
+CONFIG_DEFAULT_FDT_FILE="freescale/imx8mp-dhcom-pdk2.dtb"
 CONFIG_SYS_CBSIZE=2048
 CONFIG_SYS_PBSIZE=2081
 CONFIG_CONSOLE_MUX=y
@@ -144,6 +144,7 @@ CONFIG_MMC_SPEED_MODE_SET=y
 CONFIG_PARTITION_TYPE_GUID=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_UPSTREAM=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_NOWHERE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
configs/imx8mp_dhcom_pdk3_defconfig +3 -2
index 05895d6dd6f..b59f36b2f73 100644
@@ -12,7 +12,7 @@ CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0xFE0000
 CONFIG_ENV_SECT_SIZE=0x1000
 CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="imx8mp-dhcom-pdk3"
+CONFIG_DEFAULT_DEVICE_TREE="freescale/imx8mp-dhcom-pdk3"
 CONFIG_SPL_TEXT_BASE=0x920000
 CONFIG_TARGET_IMX8MP_DH_DHCOM_PDK2=y
 CONFIG_DM_RESET=y
@@ -50,7 +50,7 @@ CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="run dh_update_env distro_bootcmd ; reset"
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="gpio clear GPIO1_11 ; sleep 0.1 ; gpio set GPIO1_11 ; sleep 0.1 ; i2c dev 4 && i2c mw 0x70 0 4 && i2c probe 0x2d && i2c mw 0x2d 0xaa55.2 0"
-CONFIG_DEFAULT_FDT_FILE="imx8mp-dhcom-pdk3.dtb"
+CONFIG_DEFAULT_FDT_FILE="freescale/imx8mp-dhcom-pdk3.dtb"
 CONFIG_SYS_CBSIZE=2048
 CONFIG_SYS_PBSIZE=2081
 CONFIG_CONSOLE_MUX=y
@@ -147,6 +147,7 @@ CONFIG_MMC_SPEED_MODE_SET=y
 CONFIG_PARTITION_TYPE_GUID=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_UPSTREAM=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_NOWHERE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
Signature · 1 line
2.45.2
Tested-by on v1 1/3
#13 lore raw
In reply to Marek Vasut

Hi Marek,

Quoted 5 lines · Marek Vasut

The dtbs: target is almost identical in all architecture Makefiles. All architecture Makefiles include scripts/Makefile.dts . Deduplicate the dtbs: target into scripts/Makefile.dts . No functional change.

Quoted 327 lines

---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Caleb Connolly <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Lothar Rubusch <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
  arch/arc/dts/Makefile            | 9 +--------
  arch/arm/dts/Makefile            | 8 --------
  arch/m68k/dts/Makefile           | 9 +--------
  arch/microblaze/dts/Makefile     | 9 +--------
  arch/mips/dts/Makefile           | 8 --------
  arch/nios2/dts/Makefile          | 9 +--------
  arch/powerpc/dts/Makefile        | 8 --------
  arch/riscv/dts/Makefile          | 9 +--------
  arch/sandbox/dts/Makefile        | 9 +--------
  arch/sh/dts/Makefile             | 8 --------
  arch/x86/dts/Makefile            | 8 --------
  arch/xtensa/dts/Makefile         | 8 --------
  dts/upstream/src/arm/Makefile    | 8 --------
  dts/upstream/src/arm64/Makefile  | 8 --------
  dts/upstream/src/xtensa/Makefile | 8 --------
  scripts/Makefile.dts             | 8 ++++++++
  16 files changed, 14 insertions(+), 120 deletions(-)
arch/arc/dts/Makefile +1 -8
index 532a8131c59..fe6ad7b849a 100644
@@ -10,12 +10,5 @@ dtb-$(CONFIG_TARGET_IOT_DEVKIT) +=  iot_devkit.dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
  DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/arm/dts/Makefile +0 -8
index cdb90f1d358..5976ebd09fc 100644
@@ -1304,16 +1304,8 @@ dtb-$(CONFIG_TARGET_CORSTONE1000) += corstone1000-mps3.dtb \
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  # Add any required device tree compiler flags here
  DTC_FLAGS += -a 0x8
 
  DTC_FLAGS_imx8mp-dhcom-som-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
  DTC_FLAGS_imx8mp-dhcom-pdk3-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *.dtbo *_HS
arch/m68k/dts/Makefile +1 -8
index 7988522eb98..8b354b9c570 100644
@@ -20,12 +20,5 @@ dtb-$(CONFIG_TARGET_STMARK2) += stmark2.dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
  DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/microblaze/dts/Makefile +1 -8
index 427a8f9aaca..9be902d3bb1 100644
@@ -4,12 +4,5 @@ dtb-y += $(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)).dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
  DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/mips/dts/Makefile +0 -8
index 14fbce597b9..752e771514f 100644
@@ -39,13 +39,5 @@ dtb-$(CONFIG_SOC_SERVAL) += serval_pcb105.dtb serval_pcb106.dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  # Add any required device tree compiler flags here
  DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/nios2/dts/Makefile +1 -8
index 2b29fa90f6c..d77db9762a1 100644
@@ -4,12 +4,5 @@ dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
  DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/powerpc/dts/Makefile +0 -8
index 321c644804e..766b0c05951 100644
@@ -35,13 +35,5 @@ dtb-$(CONFIG_TARGET_CMPCPRO) += cmpcpro.dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  # Add any required device tree compiler flags here
  DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/riscv/dts/Makefile +1 -8
index c4c44057bad..f3dfd751cb4 100644
@@ -15,12 +15,5 @@ dtb-$(CONFIG_TARGET_ASPEED_AST2700_IBEX) += ast2700-ibex.dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
  DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/sandbox/dts/Makefile +1 -8
index f810b4752f5..1c9fb4a4566 100644
@@ -10,12 +10,5 @@ dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
  DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *.dtbo
arch/sh/dts/Makefile +0 -8
index 144fd3e7d22..e9153e42534 100644
@@ -2,13 +2,5 @@ dtb-y += sh7751-r2dplus.dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  # Add any required device tree compiler flags here
  DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *_HS
arch/x86/dts/Makefile +0 -8
index cd77f4c4e81..9a46726e026 100644
@@ -24,12 +24,4 @@ dtb-y += bayleybay.dtb \
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  DTC_FLAGS += -R 4 -p $(if $(CONFIG_EFI_APP),0x8000,0x1000)
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
arch/xtensa/dts/Makefile +0 -8
index c22c50ac4e5..aa582b85e5c 100644
@@ -4,12 +4,4 @@ dtb-$(CONFIG_XTENSA) += ml605.dtb ml605_nommu.dtb kc705.dtb kc705_nommu.dtb
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb
dts/upstream/src/arm/Makefile +0 -8
index 9a8f6aa3584..c86a2be5d85 100644
@@ -2,13 +2,5 @@
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  # Add any required device tree compiler flags here
  DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := */*.dtb */*.dtbo
dts/upstream/src/arm64/Makefile +0 -8
index 26a83d3d29d..b6db0dc6b26 100644
@@ -2,17 +2,9 @@
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  # Add any required device tree compiler flags here
  DTC_FLAGS += -a 0x8
 
  ifdef CONFIG_RCAR_64
  DTC_FLAGS += -R 4 -p 0x1000
  endif
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := */*.dtb */*.dtbo
dts/upstream/src/xtensa/Makefile +0 -8
index 2a81acb32bc..c86a2be5d85 100644
@@ -2,13 +2,5 @@
 
  include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
  # Add any required device tree compiler flags here
  DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	@:
-
-clean-files := *.dtb *.dtbo */*.dtb */*.dtbo
scripts/Makefile.dts +8 -0
index 790f3c508f1..1fe142f2bbf 100644
@@ -14,3 +14,11 @@ dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFI
  dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts))
 
  endif
+
+targets += $(dtb-y)
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+	@:
+
+clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS
Signature · 1 line
// Caleb (they/them)
Reviewed-by on v1 1/3
#14 lore raw
In reply to Marek Vasut
Quoted 33 lines · Marek Vasut

The dtbs: target is almost identical in all architecture Makefiles. All architecture Makefiles include scripts/Makefile.dts . Deduplicate the dtbs: target into scripts/Makefile.dts . No functional change.

---
Cc: "NXP i.MX U-Boot Team" <[email protected]>
Cc: Caleb Connolly <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Lothar Rubusch <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Sumit Garg <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 arch/arc/dts/Makefile            | 9 +--------
 arch/arm/dts/Makefile            | 8 --------
 arch/m68k/dts/Makefile           | 9 +--------
 arch/microblaze/dts/Makefile     | 9 +--------
 arch/mips/dts/Makefile           | 8 --------
 arch/nios2/dts/Makefile          | 9 +--------
 arch/powerpc/dts/Makefile        | 8 --------
 arch/riscv/dts/Makefile          | 9 +--------
 arch/sandbox/dts/Makefile        | 9 +--------
Quoted 9 lines
 arch/sh/dts/Makefile             | 8 --------
 arch/x86/dts/Makefile            | 8 --------
 arch/xtensa/dts/Makefile         | 8 --------
 dts/upstream/src/arm/Makefile    | 8 --------
 dts/upstream/src/arm64/Makefile  | 8 --------
 dts/upstream/src/xtensa/Makefile | 8 --------
 scripts/Makefile.dts             | 8 ++++++++
 16 files changed, 14 insertions(+), 120 deletions(-)

-Sumit

Quoted 294 lines
arch/arc/dts/Makefile +1 -8
index 532a8131c59..fe6ad7b849a 100644
@@ -10,12 +10,5 @@ dtb-$(CONFIG_TARGET_IOT_DEVKIT) +=  iot_devkit.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/arm/dts/Makefile +0 -8
index cdb90f1d358..5976ebd09fc 100644
@@ -1304,16 +1304,8 @@ dtb-$(CONFIG_TARGET_CORSTONE1000) += corstone1000-mps3.dtb \
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
 
 DTC_FLAGS_imx8mp-dhcom-som-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
 DTC_FLAGS_imx8mp-dhcom-pdk3-overlay-rev100 += -Wno-avoid_default_addr_size -Wno-reg_format
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb *.dtbo *_HS
arch/m68k/dts/Makefile +1 -8
index 7988522eb98..8b354b9c570 100644
@@ -20,12 +20,5 @@ dtb-$(CONFIG_TARGET_STMARK2) += stmark2.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/microblaze/dts/Makefile +1 -8
index 427a8f9aaca..9be902d3bb1 100644
@@ -4,12 +4,5 @@ dtb-y += $(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)).dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/mips/dts/Makefile +0 -8
index 14fbce597b9..752e771514f 100644
@@ -39,13 +39,5 @@ dtb-$(CONFIG_SOC_SERVAL) += serval_pcb105.dtb serval_pcb106.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/nios2/dts/Makefile +1 -8
index 2b29fa90f6c..d77db9762a1 100644
@@ -4,12 +4,5 @@ dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/powerpc/dts/Makefile +0 -8
index 321c644804e..766b0c05951 100644
@@ -35,13 +35,5 @@ dtb-$(CONFIG_TARGET_CMPCPRO) += cmpcpro.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/riscv/dts/Makefile +1 -8
index c4c44057bad..f3dfd751cb4 100644
@@ -15,12 +15,5 @@ dtb-$(CONFIG_TARGET_ASPEED_AST2700_IBEX) += ast2700-ibex.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/sandbox/dts/Makefile +1 -8
index f810b4752f5..1c9fb4a4566 100644
@@ -10,12 +10,5 @@ dtb-$(CONFIG_CMD_EXTENSION) += overlay0.dtbo overlay1.dtbo
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
+# Add any required device tree compiler flags here
 DTC_FLAGS += -R 4 -p 0x1000
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb *.dtbo
arch/sh/dts/Makefile +0 -8
index 144fd3e7d22..e9153e42534 100644
@@ -2,13 +2,5 @@ dtb-y += sh7751-r2dplus.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb *_HS
arch/x86/dts/Makefile +0 -8
index cd77f4c4e81..9a46726e026 100644
@@ -24,12 +24,4 @@ dtb-y += bayleybay.dtb \
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 DTC_FLAGS += -R 4 -p $(if $(CONFIG_EFI_APP),0x8000,0x1000)
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
arch/xtensa/dts/Makefile +0 -8
index c22c50ac4e5..aa582b85e5c 100644
@@ -4,12 +4,4 @@ dtb-$(CONFIG_XTENSA) += ml605.dtb ml605_nommu.dtb kc705.dtb kc705_nommu.dtb
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 DTC_FLAGS +=
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb
dts/upstream/src/arm/Makefile +0 -8
index 9a8f6aa3584..c86a2be5d85 100644
@@ -2,13 +2,5 @@
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := */*.dtb */*.dtbo
dts/upstream/src/arm64/Makefile +0 -8
index 26a83d3d29d..b6db0dc6b26 100644
@@ -2,17 +2,9 @@
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
 
 ifdef CONFIG_RCAR_64
 DTC_FLAGS += -R 4 -p 0x1000
 endif
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := */*.dtb */*.dtbo
dts/upstream/src/xtensa/Makefile +0 -8
index 2a81acb32bc..c86a2be5d85 100644
@@ -2,13 +2,5 @@
 
 include $(srctree)/scripts/Makefile.dts
 
-targets += $(dtb-y)
-
 # Add any required device tree compiler flags here
 DTC_FLAGS += -a 0x8
-
-PHONY += dtbs
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-       @:
-
-clean-files := *.dtb *.dtbo */*.dtb */*.dtbo
scripts/Makefile.dts +8 -1
index 790f3c508f1..1fe142f2bbf 100644
@@ -14,3 +14,11 @@ dtb-vendor_dts := $(patsubst %.dts,%.dtb,$(wildcard $(dt_dir)/$(subst ",,$(CONFI
 dtb-y += $(subst $(dt_dir)/,,$(dtb-vendor_dts))
 
 endif
+
+targets += $(dtb-y)
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+       @:
+
+clean-files := *.dtb *.dtbo */*.dtb */*.dtbo *_HS
--

2.45.2