linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/13] Enable building all dtb files
@ 2015-10-08 17:53 Rob Herring
  2015-10-08 17:53 ` [PATCH v2 01/13] of: add config option to enable building of all dtbs Rob Herring
                   ` (12 more replies)
  0 siblings, 13 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Chris Zankel, Max Filippov, linux-xtensa,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev, Ley Foon Tan, nios2-dev, Ralf Baechle, linux-mips,
	James Hogan, linux-metag, Yoshinori Sato, uclinux-h8-devel,
	Russell King, Catalin Marinas, Will Deacon, linux-arm-kernel,
	Vineet Gupta, arm

This series enables building all the dtb files in the kernel mostly 
independent of the kernel config. The option is only dependent on 
COMPILE_TEST, OF, and the new OF_ALL_DTBS options. This ensures that 
allyesconfig builds can build all dtb files although most arches have to 
build "dtbs" target explicitly. Some arches like ARM include dtbs in the 
default target.

Arch/arm-soc maintainers, Please ack and I will take this series via the DT 
tree.

v2:
- Add OF_ALL_DTBS option hidden behind COMPILE_TEST
- Expand to all architectures (with more than 1 dtb)

Rob


Rob Herring (13):
  of: add config option to enable building of all dtbs
  arc: use common make variables for dtb builds
  arc: enable building of all dtbs
  arm: enable building of all dtbs
  arm64: enable building of all dtbs
  h8300: enable building of all dtbs
  metag: use common make variables for dtb builds
  metag: enable building of all dtbs
  mips: enable building of all dtbs
  nios2: use common make variables for dtb builds
  nios2: enable building of all dtbs
  powerpc: enable building of all dtbs
  xtensa: enable building of all dtbs

 arch/arc/Makefile              |  2 +-
 arch/arc/boot/dts/Makefile     |  6 ++++--
 arch/arm/boot/dts/Makefile     |  3 +++
 arch/arm64/boot/dts/Makefile   |  6 ++++++
 arch/h8300/boot/dts/Makefile   |  3 +++
 arch/metag/Makefile            |  2 +-
 arch/metag/boot/dts/Makefile   |  7 +++----
 arch/mips/boot/dts/Makefile    |  3 +++
 arch/nios2/Makefile            | 10 +++++-----
 arch/nios2/boot/Makefile       | 13 +++----------
 arch/nios2/boot/dts/Makefile   |  6 ++++++
 arch/powerpc/Makefile          |  6 ++++++
 arch/powerpc/boot/Makefile     |  5 ++++-
 arch/powerpc/boot/dts/Makefile |  5 +++++
 arch/xtensa/Makefile           |  4 ++++
 arch/xtensa/boot/dts/Makefile  |  7 ++++++-
 drivers/of/Kconfig             | 10 ++++++++++
 17 files changed, 73 insertions(+), 25 deletions(-)
 create mode 100644 arch/nios2/boot/dts/Makefile
 create mode 100644 arch/powerpc/boot/dts/Makefile

-- 
2.1.4


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

* [PATCH v2 01/13] of: add config option to enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 02/13] arc: use common make variables for dtb builds Rob Herring
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.

In order to only build dtbs, this option can be used by creating an
allno.config file containing:
CONFIG_COMPILE_TEST=y
CONFIG_OF=y
CONFIG_OF_ALL_DTBS=y

And then running:
make KCONFIG_ALLCONFIG=1 allnoconfig
make dtbs

While building the dtbs themselves don't need a cross compiler, the
scripts dependency does need one. This can be hacked around by
commenting out "subdir-y += mod" in scripts/Makefile.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
---
 drivers/of/Kconfig | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig
index 59bb855..e2a4841 100644
--- a/drivers/of/Kconfig
+++ b/drivers/of/Kconfig
@@ -23,6 +23,16 @@ config OF_UNITTEST
 
 	  If unsure, say N here, but this option is safe to enable.
 
+config OF_ALL_DTBS
+	bool "Build all Device Tree Blobs"
+	depends on COMPILE_TEST
+	select DTC
+	help
+	  This option builds all possible Device Tree Blobs (DTBs) for the
+	  current architecture.
+
+	  If unsure, say N here, but this option is safe to enable.
+
 config OF_FLATTREE
 	bool
 	select DTC
-- 
2.1.4


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

* [PATCH v2 02/13] arc: use common make variables for dtb builds
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
  2015-10-08 17:53 ` [PATCH v2 01/13] of: add config option to enable building of all dtbs Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-27 12:53   ` Vineet Gupta
  2015-10-08 17:53 ` [PATCH v2 03/13] arc: enable building of all dtbs Rob Herring
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Vineet Gupta

Use dtb-y and always make variables to build dtbs instead of explicit
dtbs rule. This is in preparation to support building all dtbs.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/Makefile          | 2 +-
 arch/arc/boot/dts/Makefile | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 8a27a48..cf0cf34 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -121,7 +121,7 @@ $(boot_targets): vmlinux
 	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
 
 dtbs: scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts dtbs
+	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
diff --git a/arch/arc/boot/dts/Makefile b/arch/arc/boot/dts/Makefile
index b0e3f19..e8e46f9 100644
--- a/arch/arc/boot/dts/Makefile
+++ b/arch/arc/boot/dts/Makefile
@@ -6,10 +6,10 @@ ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
 endif
 
 obj-y   += $(builtindtb-y).dtb.o
-targets += $(builtindtb-y).dtb
+dtb-y := $(builtindtb-y).dtb
 
 .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
 
-dtbs:  $(addprefix  $(obj)/, $(builtindtb-y).dtb)
 
+always := $(dtb-y)
 clean-files := *.dtb  *.dtb.S
-- 
2.1.4


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

* [PATCH v2 03/13] arc: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
  2015-10-08 17:53 ` [PATCH v2 01/13] of: add config option to enable building of all dtbs Rob Herring
  2015-10-08 17:53 ` [PATCH v2 02/13] arc: use common make variables for dtb builds Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-27 12:52   ` Vineet Gupta
  2015-10-08 17:53 ` [PATCH v2 04/13] arm: " Rob Herring
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Vineet Gupta

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/boot/dts/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arc/boot/dts/Makefile b/arch/arc/boot/dts/Makefile
index e8e46f9..a09f11b 100644
--- a/arch/arc/boot/dts/Makefile
+++ b/arch/arc/boot/dts/Makefile
@@ -10,6 +10,8 @@ dtb-y := $(builtindtb-y).dtb
 
 .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
 
+dtstree		:= $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
 
 always := $(dtb-y)
 clean-files := *.dtb  *.dtb.S
-- 
2.1.4


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

* [PATCH v2 04/13] arm: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (2 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 03/13] arc: enable building of all dtbs Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 05/13] arm64: " Rob Herring
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, arm, Russell King

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed. This
is simpler for arm64 which has a bunch of sub-dirs.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
---
 arch/arm/boot/dts/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 233159d..349eb12 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -740,5 +740,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
 dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
 endif
 
+dtstree		:= $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
+
 always		:= $(dtb-y)
 clean-files	:= *.dtb
-- 
2.1.4


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

* [PATCH v2 05/13] arm64: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (3 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 04/13] arm: " Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 18:15   ` Geert Uytterhoeven
  2015-10-08 17:53 ` [PATCH v2 06/13] h8300: " Rob Herring
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, arm, Catalin Marinas, Will Deacon,
	linux-arm-kernel

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed. This
is simpler for arm64 which has a bunch of sub-dirs.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm64/boot/dts/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index d9f8833..b01ec43 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -14,3 +14,9 @@ dts-dirs += sprd
 dts-dirs += xilinx
 
 subdir-y	:= $(dts-dirs)
+
+dtstree		:= $(srctree)/$(src)
+
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
+
+always		:= $(dtb-y)
-- 
2.1.4


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

* [PATCH v2 06/13] h8300: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (4 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 05/13] arm64: " Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 07/13] metag: use common make variables for dtb builds Rob Herring
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Yoshinori Sato, uclinux-h8-devel

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: uclinux-h8-devel@lists.sourceforge.jp
---
 arch/h8300/boot/dts/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/h8300/boot/dts/Makefile b/arch/h8300/boot/dts/Makefile
index 0abaf1a..6c08467 100644
--- a/arch/h8300/boot/dts/Makefile
+++ b/arch/h8300/boot/dts/Makefile
@@ -8,5 +8,8 @@ dtb-$(CONFIG_H8300H_SIM) := h8300h_sim.dtb
 dtb-$(CONFIG_H8S_SIM) := h8s_sim.dtb
 dtb-$(CONFIG_H8S_EDOSK2674) := edosk2674.dtb
 
+dtstree		:= $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
+
 always	    := $(dtb-y)
 clean-files := *.dtb.S *.dtb
-- 
2.1.4


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

* [PATCH v2 07/13] metag: use common make variables for dtb builds
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (5 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 06/13] h8300: " Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 08/13] metag: enable building of all dtbs Rob Herring
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, James Hogan, linux-metag

Use dtb-y and always make variables to build dtbs instead of explicit
dtbs rule. This is in preparation to support building all dtbs.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
---
 arch/metag/Makefile          | 2 +-
 arch/metag/boot/dts/Makefile | 6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/metag/Makefile b/arch/metag/Makefile
index 9739857..033a582 100644
--- a/arch/metag/Makefile
+++ b/arch/metag/Makefile
@@ -72,7 +72,7 @@ $(boot_targets): vmlinux
 	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
 
 dtbs: scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts dtbs
+	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
diff --git a/arch/metag/boot/dts/Makefile b/arch/metag/boot/dts/Makefile
index 72c1218..2533c38 100644
--- a/arch/metag/boot/dts/Makefile
+++ b/arch/metag/boot/dts/Makefile
@@ -12,11 +12,7 @@ endif
 dtb-$(CONFIG_METAG_BUILTIN_DTB)	+= $(builtindtb-y).dtb
 obj-$(CONFIG_METAG_BUILTIN_DTB)	+= $(builtindtb-y).dtb.o
 
-targets	+= dtbs
-targets	+= $(dtb-y)
-
 .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
 
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-
+always += $(dtb-y)
 clean-files += *.dtb *.dtb.S
-- 
2.1.4


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

* [PATCH v2 08/13] metag: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (6 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 07/13] metag: use common make variables for dtb builds Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 09/13] mips: " Rob Herring
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, James Hogan, linux-metag

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
---
 arch/metag/boot/dts/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/metag/boot/dts/Makefile b/arch/metag/boot/dts/Makefile
index 2533c38..097c6da 100644
--- a/arch/metag/boot/dts/Makefile
+++ b/arch/metag/boot/dts/Makefile
@@ -12,6 +12,9 @@ endif
 dtb-$(CONFIG_METAG_BUILTIN_DTB)	+= $(builtindtb-y).dtb
 obj-$(CONFIG_METAG_BUILTIN_DTB)	+= $(builtindtb-y).dtb.o
 
+dtstree		:= $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
+
 .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
 
 always += $(dtb-y)
-- 
2.1.4


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

* [PATCH v2 09/13] mips: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (7 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 08/13] metag: enable building of all dtbs Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 10/13] nios2: use common make variables for dtb builds Rob Herring
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Ralf Baechle, linux-mips

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
---
 arch/mips/boot/dts/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile
index 778a340..bac7b8d 100644
--- a/arch/mips/boot/dts/Makefile
+++ b/arch/mips/boot/dts/Makefile
@@ -9,6 +9,9 @@ dts-dirs	+= ralink
 
 obj-y		:= $(addsuffix /, $(dts-dirs))
 
+dtstree		:= $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
+
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
 clean-files	:= *.dtb *.dtb.S
-- 
2.1.4


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

* [PATCH v2 10/13] nios2: use common make variables for dtb builds
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (8 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 09/13] mips: " Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 11/13] nios2: enable building of all dtbs Rob Herring
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Ley Foon Tan, nios2-dev

Use common rules and dtb-y and always make variables to build dtbs
instead of explicit dtbs rule. Add the missing script dependencies as
well.

This is in preparation to support building all dtbs.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: nios2-dev@lists.rocketboards.org
---
 arch/nios2/Makefile          | 10 +++++-----
 arch/nios2/boot/Makefile     | 13 +++----------
 arch/nios2/boot/dts/Makefile |  3 +++
 3 files changed, 11 insertions(+), 15 deletions(-)
 create mode 100644 arch/nios2/boot/dts/Makefile

diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
index 2328f82..5508587 100644
--- a/arch/nios2/Makefile
+++ b/arch/nios2/Makefile
@@ -41,7 +41,7 @@ core-y		+= arch/nios2/platform/
 INSTALL_PATH ?= /tftpboot
 nios2-boot := arch/$(ARCH)/boot
 BOOT_TARGETS = vmImage zImage
-PHONY += $(BOOT_TARGETS) install
+PHONY += $(BOOT_TARGETS) install dtbs
 KBUILD_IMAGE := $(nios2-boot)/vmImage
 
 ifneq ($(CONFIG_NIOS2_DTB_SOURCE),"")
@@ -53,11 +53,11 @@ all: vmImage
 archclean:
 	$(Q)$(MAKE) $(clean)=$(nios2-boot)
 
-%.dtb:
-	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
+%.dtb: scripts
+	$(Q)$(MAKE) $(build)=$(nios2-boot)/dts $(nios2-boot)/dts/$@
 
-dtbs:
-	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
+dtbs: prepare scripts
+	$(Q)$(MAKE) $(build)=$(nios2-boot)/dts
 
 $(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
diff --git a/arch/nios2/boot/Makefile b/arch/nios2/boot/Makefile
index c899876..187e45d 100644
--- a/arch/nios2/boot/Makefile
+++ b/arch/nios2/boot/Makefile
@@ -31,6 +31,9 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
 $(obj)/compressed/vmlinux: $(obj)/vmlinux.gz FORCE
 	$(Q)$(MAKE) $(build)=$(obj)/compressed $@
 
+# Let clean descend into subdirs
+subdir- := dts
+
 # Rule to build device tree blobs
 DTB_SRC := $(patsubst "%",%,$(CONFIG_NIOS2_DTB_SOURCE))
 
@@ -45,15 +48,5 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb
 
 obj-$(CONFIG_NIOS2_DTB_SOURCE_BOOL) += linked_dtb.o
 
-targets += $(dtb-y)
-
-# Rule to build device tree blobs with make command
-$(obj)/%.dtb: $(src)/dts/%.dts FORCE
-	$(call if_changed_dep,dtc)
-
-$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
-
-clean-files := *.dtb
-
 install:
 	sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
diff --git a/arch/nios2/boot/dts/Makefile b/arch/nios2/boot/dts/Makefile
new file mode 100644
index 0000000..1c52039
--- /dev/null
+++ b/arch/nios2/boot/dts/Makefile
@@ -0,0 +1,3 @@
+always          := $(dtb-y)
+clean-files     := *.dtb
+
-- 
2.1.4


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

* [PATCH v2 11/13] nios2: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (9 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 10/13] nios2: use common make variables for dtb builds Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-08 17:53 ` [PATCH v2 12/13] powerpc: " Rob Herring
  2015-10-08 17:53 ` [PATCH v2 13/13] xtensa: " Rob Herring
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Ley Foon Tan, nios2-dev

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: nios2-dev@lists.rocketboards.org
---
 arch/nios2/boot/dts/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/nios2/boot/dts/Makefile b/arch/nios2/boot/dts/Makefile
index 1c52039..0b6bcf1 100644
--- a/arch/nios2/boot/dts/Makefile
+++ b/arch/nios2/boot/dts/Makefile
@@ -1,3 +1,6 @@
+dtstree		:= $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
+
 always          := $(dtb-y)
 clean-files     := *.dtb
 
-- 
2.1.4


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

* [PATCH v2 12/13] powerpc: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (10 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 11/13] nios2: enable building of all dtbs Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  2015-10-12 10:26   ` Michael Ellerman
  2015-10-08 17:53 ` [PATCH v2 13/13] xtensa: " Rob Herring
  12 siblings, 1 reply; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Supporting this requires adding 'dtbs' make target which was not yet
supported on powerpc.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/Makefile          | 6 ++++++
 arch/powerpc/boot/Makefile     | 5 ++++-
 arch/powerpc/boot/dts/Makefile | 5 +++++
 3 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 arch/powerpc/boot/dts/Makefile

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index b9b4af2..0ec35ff 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -273,6 +273,11 @@ bootwrapper_install:
 %.dtb: scripts
 	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
 
+PHONY += dtbs
+
+dtbs: prepare scripts
+	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot)/dts
+
 # Used to create 'merged defconfigs'
 # To use it $(call) it with the first argument as the base defconfig
 # and the second argument as a space separated list of .config files to merge,
@@ -317,6 +322,7 @@ define archhelp
   @echo '  dtbImage.<dt>   - zImage with an embedded device tree blob'
   @echo '  simpleImage.<dt> - Firmware independent image.'
   @echo '  treeImage.<dt>  - Support for older IBM 4xx firmware (not U-Boot)'
+  echo  '  dtbs            - Build device tree blobs for enabled boards'
   @echo '  install         - Install kernel using'
   @echo '                    (your) ~/bin/$(INSTALLKERNEL) or'
   @echo '                    (distribution) /sbin/$(INSTALLKERNEL) or'
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 4eec430..381df1a 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -402,7 +402,7 @@ zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
 clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
 	zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
 	zImage.miboot zImage.pmac zImage.pseries \
-	zImage.maple simpleImage.* otheros.bld *.dtb
+	zImage.maple simpleImage.* otheros.bld
 
 # clean up files cached by wrapper
 clean-kernel := vmlinux.strip vmlinux.bin
@@ -410,6 +410,9 @@ clean-kernel += $(addsuffix .gz,$(clean-kernel))
 # If not absolute clean-files are relative to $(obj).
 clean-files += $(addprefix $(objtree)/, $(clean-kernel))
 
+# Let clean descend into subdirs
+subdir- := dts
+
 WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
 WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
 WRAPPER_BINDIR := /usr/sbin
diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile
new file mode 100644
index 0000000..f121775
--- /dev/null
+++ b/arch/powerpc/boot/dts/Makefile
@@ -0,0 +1,5 @@
+dtstree		:= $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
+
+always		:= $(dtb-y)
+clean-files	:= *.dtb
-- 
2.1.4


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

* [PATCH v2 13/13] xtensa: enable building of all dtbs
  2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
                   ` (11 preceding siblings ...)
  2015-10-08 17:53 ` [PATCH v2 12/13] powerpc: " Rob Herring
@ 2015-10-08 17:53 ` Rob Herring
  12 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 17:53 UTC (permalink / raw)
  To: devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson, Chris Zankel, Max Filippov, linux-xtensa

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
---
 arch/xtensa/Makefile          | 4 ++++
 arch/xtensa/boot/dts/Makefile | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index f9e6a06..709b574 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -101,6 +101,10 @@ zImage: vmlinux
 %.dtb:
 	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
 
+dtbs: scripts
+	$(Q)$(MAKE) $(build)=$(boot)/dts
+
 define archhelp
   @echo '* zImage      - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
+  @echo '  dtbs        - Build device tree blobs for enabled boards'
 endef
diff --git a/arch/xtensa/boot/dts/Makefile b/arch/xtensa/boot/dts/Makefile
index 5f711bb..a15e241 100644
--- a/arch/xtensa/boot/dts/Makefile
+++ b/arch/xtensa/boot/dts/Makefile
@@ -12,4 +12,9 @@ ifneq ($(CONFIG_BUILTIN_DTB),"")
 obj-$(CONFIG_OF) += $(BUILTIN_DTB)
 endif
 
-clean-files := *.dtb.S
+dtstree := $(srctree)/$(src)
+dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
+
+always += $(dtb-y)
+clean-files += *.dtb *.dtb.S
+
-- 
2.1.4


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

* Re: [PATCH v2 05/13] arm64: enable building of all dtbs
  2015-10-08 17:53 ` [PATCH v2 05/13] arm64: " Rob Herring
@ 2015-10-08 18:15   ` Geert Uytterhoeven
  2015-10-08 18:54     ` Rob Herring
  0 siblings, 1 reply; 20+ messages in thread
From: Geert Uytterhoeven @ 2015-10-08 18:15 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, Grant Likely, Frank Rowand,
	Ian Campbell, Olof Johansson, arm, Catalin Marinas, Will Deacon,
	linux-arm-kernel

On Thu, Oct 8, 2015 at 7:53 PM, Rob Herring <robh@kernel.org> wrote:
> Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
> are not really dependent on a platform being enabled or any other kernel
> config, so for testing coverage it is convenient to build all of the dtbs.
> This builds all dts files in the tree, not just targets listed. This
> is simpler for arm64 which has a bunch of sub-dirs.

This doesn't look simpler than the arm(32) version?

> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>  arch/arm64/boot/dts/Makefile | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
> index d9f8833..b01ec43 100644
> --- a/arch/arm64/boot/dts/Makefile
> +++ b/arch/arm64/boot/dts/Makefile
> @@ -14,3 +14,9 @@ dts-dirs += sprd
>  dts-dirs += xilinx
>
>  subdir-y       := $(dts-dirs)
> +
> +dtstree                := $(srctree)/$(src)
> +
> +dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts)))
> +




-- 
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH v2 05/13] arm64: enable building of all dtbs
  2015-10-08 18:15   ` Geert Uytterhoeven
@ 2015-10-08 18:54     ` Rob Herring
  0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-08 18:54 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: devicetree, linux-kernel, Grant Likely, Frank Rowand,
	Ian Campbell, Olof Johansson, arm, Catalin Marinas, Will Deacon,
	linux-arm-kernel

On Thu, Oct 8, 2015 at 1:15 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Thu, Oct 8, 2015 at 7:53 PM, Rob Herring <robh@kernel.org> wrote:
>> Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
>> are not really dependent on a platform being enabled or any other kernel
>> config, so for testing coverage it is convenient to build all of the dtbs.
>> This builds all dts files in the tree, not just targets listed. This
>> is simpler for arm64 which has a bunch of sub-dirs.
>
> This doesn't look simpler than the arm(32) version?

I discussed this with Olof in the last version. In the ARM version, I
could have done just one line "dtb-$(CONFIG_OF_ALL_DTBS) += $(dtb-)"
to add all the disabled dtbs. On arm64, I would have to do that for
each sub-dir Makefile as well as make sure any new sub-dirs have this
line. In the end, I also prefer to build everything in the tree and
not rely on the dtbs to be explicitly listed.

Rob

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

* Re: [PATCH v2 12/13] powerpc: enable building of all dtbs
  2015-10-08 17:53 ` [PATCH v2 12/13] powerpc: " Rob Herring
@ 2015-10-12 10:26   ` Michael Ellerman
  2015-10-13 15:24     ` Rob Herring
  0 siblings, 1 reply; 20+ messages in thread
From: Michael Ellerman @ 2015-10-12 10:26 UTC (permalink / raw)
  To: Rob Herring
  Cc: devicetree, linux-kernel, Grant Likely, Frank Rowand,
	Ian Campbell, Geert Uytterhoeven, Olof Johansson,
	Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev

On Thu, 2015-10-08 at 12:53 -0500, Rob Herring wrote:
> Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
> are not really dependent on a platform being enabled or any other kernel
> config, so for testing coverage it is convenient to build all of the dtbs.
> This builds all dts files in the tree, not just targets listed.
> 
> Supporting this requires adding 'dtbs' make target which was not yet
> supported on powerpc.

I'm not entirely clear why we want this? It just means we can test build all
the dts regardless of what kernel config we are building?

Have you tested the powerpc build with this applied or do you want me to?

> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
> index b9b4af2..0ec35ff 100644
> --- a/arch/powerpc/Makefile
> +++ b/arch/powerpc/Makefile
> @@ -273,6 +273,11 @@ bootwrapper_install:
>  %.dtb: scripts
>  	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
>  
> +PHONY += dtbs
> +
> +dtbs: prepare scripts
> +	$(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot)/dts

The ARCH should be powerpc, I guess you just copied the one above.

> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
> index 4eec430..381df1a 100644
> --- a/arch/powerpc/boot/Makefile
> +++ b/arch/powerpc/boot/Makefile
> @@ -402,7 +402,7 @@ zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
>  clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
>  	zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
>  	zImage.miboot zImage.pmac zImage.pseries \
> -	zImage.maple simpleImage.* otheros.bld *.dtb
> +	zImage.maple simpleImage.* otheros.bld

This looks like we used to clean *.dtb in the current dir but now we don't? But
I'm probably just not understanding how clean-files works.

> @@ -410,6 +410,9 @@ clean-kernel += $(addsuffix .gz,$(clean-kernel))
>  # If not absolute clean-files are relative to $(obj).
>  clean-files += $(addprefix $(objtree)/, $(clean-kernel))
>  
> +# Let clean descend into subdirs
> +subdir- := dts
> +
>  WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
>  WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
>  WRAPPER_BINDIR := /usr/sbin
> diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile
> new file mode 100644
> index 0000000..f121775
> --- /dev/null
> +++ b/arch/powerpc/boot/dts/Makefile
> @@ -0,0 +1,5 @@
> +dtstree		:= $(srctree)/$(src)
> +dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
> +
> +always		:= $(dtb-y)

How/is that different from just doing the more normal:

obj-$(CONFIG_OF_ALL_DTBS) := ...

?

cheers



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

* Re: [PATCH v2 12/13] powerpc: enable building of all dtbs
  2015-10-12 10:26   ` Michael Ellerman
@ 2015-10-13 15:24     ` Rob Herring
  0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-10-13 15:24 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Rob Herring, devicetree, linux-kernel, Grant Likely,
	Frank Rowand, Ian Campbell, Geert Uytterhoeven, Olof Johansson,
	Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev

On Mon, Oct 12, 2015 at 5:26 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> On Thu, 2015-10-08 at 12:53 -0500, Rob Herring wrote:
>> Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
>> are not really dependent on a platform being enabled or any other kernel
>> config, so for testing coverage it is convenient to build all of the dtbs.
>> This builds all dts files in the tree, not just targets listed.
>>
>> Supporting this requires adding 'dtbs' make target which was not yet
>> supported on powerpc.
>
> I'm not entirely clear why we want this? It just means we can test build all
> the dts regardless of what kernel config we are building?

Yes. Given that I haven't found any that didn't build, that alone is
probably not so important. There's also an effort to move DT binding
docs to YAML, and I'm using dtc to dump out binding information to
automatically populate the binding docs hence I need to build all.
Eventually, we also plan to use the binding docs to validate dts
files.

> Have you tested the powerpc build with this applied or do you want me to?

Yes, I've tested powerpc.

>
>> diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
>> index b9b4af2..0ec35ff 100644
>> --- a/arch/powerpc/Makefile
>> +++ b/arch/powerpc/Makefile
>> @@ -273,6 +273,11 @@ bootwrapper_install:
>>  %.dtb: scripts
>>       $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
>>
>> +PHONY += dtbs
>> +
>> +dtbs: prepare scripts
>> +     $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot)/dts
>
> The ARCH should be powerpc, I guess you just copied the one above.

Okay, I'll drop it (it should already be set).

>
>> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
>> index 4eec430..381df1a 100644
>> --- a/arch/powerpc/boot/Makefile
>> +++ b/arch/powerpc/boot/Makefile
>> @@ -402,7 +402,7 @@ zInstall: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
>>  clean-files += $(image-) $(initrd-) cuImage.* dtbImage.* treeImage.* \
>>       zImage zImage.initrd zImage.chrp zImage.coff zImage.holly \
>>       zImage.miboot zImage.pmac zImage.pseries \
>> -     zImage.maple simpleImage.* otheros.bld *.dtb
>> +     zImage.maple simpleImage.* otheros.bld
>
> This looks like we used to clean *.dtb in the current dir but now we don't? But
> I'm probably just not understanding how clean-files works.

dtbs target is building in boot/dts. I just noticed that %.dtb targets
(or dtbImage.% targets) still build in boot/. I need to move them to
boot/dts/ as well to align with all other arches. This clean should
probably stay so dtbs get cleaned in either location.

>
>> @@ -410,6 +410,9 @@ clean-kernel += $(addsuffix .gz,$(clean-kernel))
>>  # If not absolute clean-files are relative to $(obj).
>>  clean-files += $(addprefix $(objtree)/, $(clean-kernel))
>>
>> +# Let clean descend into subdirs
>> +subdir- := dts
>> +
>>  WRAPPER_OBJDIR := /usr/lib/kernel-wrapper
>>  WRAPPER_DTSDIR := /usr/lib/kernel-wrapper/dts
>>  WRAPPER_BINDIR := /usr/sbin
>> diff --git a/arch/powerpc/boot/dts/Makefile b/arch/powerpc/boot/dts/Makefile
>> new file mode 100644
>> index 0000000..f121775
>> --- /dev/null
>> +++ b/arch/powerpc/boot/dts/Makefile
>> @@ -0,0 +1,5 @@
>> +dtstree              := $(srctree)/$(src)
>> +dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
>> +
>> +always               := $(dtb-y)
>
> How/is that different from just doing the more normal:
>
> obj-$(CONFIG_OF_ALL_DTBS) := ...
>
> ?

obj-y will build the dtb into the kernel which some arches do and not
what we want here.

Rob

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

* Re: [PATCH v2 03/13] arc: enable building of all dtbs
  2015-10-08 17:53 ` [PATCH v2 03/13] arc: enable building of all dtbs Rob Herring
@ 2015-10-27 12:52   ` Vineet Gupta
  0 siblings, 0 replies; 20+ messages in thread
From: Vineet Gupta @ 2015-10-27 12:52 UTC (permalink / raw)
  To: Rob Herring, devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson

On Thursday 08 October 2015 11:24 PM, Rob Herring wrote:

Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.
This builds all dts files in the tree, not just targets listed.

Signed-off-by: Rob Herring <robh@kernel.org><mailto:robh@kernel.org>
Cc: Vineet Gupta <vgupta@synopsys.com><mailto:vgupta@synopsys.com>

Sorry for the delay - slipped thru cracks.

Acked-by: Vineet Gupta <vgupta@synopsys.com><mailto:vgupta@synopsys.com>

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

* Re: [PATCH v2 02/13] arc: use common make variables for dtb builds
  2015-10-08 17:53 ` [PATCH v2 02/13] arc: use common make variables for dtb builds Rob Herring
@ 2015-10-27 12:53   ` Vineet Gupta
  0 siblings, 0 replies; 20+ messages in thread
From: Vineet Gupta @ 2015-10-27 12:53 UTC (permalink / raw)
  To: Rob Herring, devicetree, linux-kernel
  Cc: Grant Likely, Frank Rowand, Ian Campbell, Geert Uytterhoeven,
	Olof Johansson

On Thursday 08 October 2015 11:24 PM, Rob Herring wrote:

Use dtb-y and always make variables to build dtbs instead of explicit
dtbs rule. This is in preparation to support building all dtbs.

Signed-off-by: Rob Herring <robh@kernel.org><mailto:robh@kernel.org>
Cc: Vineet Gupta <vgupta@synopsys.com><mailto:vgupta@synopsys.com>

Acked-by: Vineet Gupta <vgupta@synopsys.com><mailto:vgupta@synopsys.com>



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

end of thread, other threads:[~2015-10-27 12:53 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-08 17:53 [PATCH v2 00/13] Enable building all dtb files Rob Herring
2015-10-08 17:53 ` [PATCH v2 01/13] of: add config option to enable building of all dtbs Rob Herring
2015-10-08 17:53 ` [PATCH v2 02/13] arc: use common make variables for dtb builds Rob Herring
2015-10-27 12:53   ` Vineet Gupta
2015-10-08 17:53 ` [PATCH v2 03/13] arc: enable building of all dtbs Rob Herring
2015-10-27 12:52   ` Vineet Gupta
2015-10-08 17:53 ` [PATCH v2 04/13] arm: " Rob Herring
2015-10-08 17:53 ` [PATCH v2 05/13] arm64: " Rob Herring
2015-10-08 18:15   ` Geert Uytterhoeven
2015-10-08 18:54     ` Rob Herring
2015-10-08 17:53 ` [PATCH v2 06/13] h8300: " Rob Herring
2015-10-08 17:53 ` [PATCH v2 07/13] metag: use common make variables for dtb builds Rob Herring
2015-10-08 17:53 ` [PATCH v2 08/13] metag: enable building of all dtbs Rob Herring
2015-10-08 17:53 ` [PATCH v2 09/13] mips: " Rob Herring
2015-10-08 17:53 ` [PATCH v2 10/13] nios2: use common make variables for dtb builds Rob Herring
2015-10-08 17:53 ` [PATCH v2 11/13] nios2: enable building of all dtbs Rob Herring
2015-10-08 17:53 ` [PATCH v2 12/13] powerpc: " Rob Herring
2015-10-12 10:26   ` Michael Ellerman
2015-10-13 15:24     ` Rob Herring
2015-10-08 17:53 ` [PATCH v2 13/13] xtensa: " Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).