Skip to contentSkip to conversation

dts, kbuild: Implement support for dtb vendor subdirs

PATCH In review Robert Richter 7 participants 21 messages Sep 5, 2014 – Nov 4, 2014

Subsystems (8)
lore
Share & tools
lore
#0 lore raw

cover dts, kbuild: Implement support for dtb vendor subdirs

From: Robert Richter <[email protected]>

For arm64 we want to put dts files into vendor's subdirectories from the beginning. This patch set implements this. As this is a generic kbuild implementation, vendor subdirs will be also available for arch/arm and other architectures. The subdirectory tree is also reflected in the install path.

A new makefile variable dts-dirs is introduced to point to dts subdirs. This variable is used by kbuild for building and installation of dtb files.

A dts Makefile looks now as follows:

----
dtb-$(CONFIG_...) += some_file_1.dtb
dtb-$(CONFIG_...) += some_file_2.dtb

dts-dirs += dir_vendor_a
dts-dirs += dir_vendor_b

# come always afterwards:
always         := $(dtb-y)
subdir-y       := $(dts-dirs)
clean-files    := *.dtb
----

This patches also introduces the dtbs_install make target for arm64. Install rules are moved to Makefile.dtbinst using the same style and calling convention like for modinst and fwinst.

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

 arch/arm/Makefile                                |   8 +-
 arch/arm/boot/dts/Makefile                       |  12 +-
 arch/arm64/Makefile                              |  10 +-
 arch/arm64/boot/dts/Makefile                     |  13 +-
 arch/arm64/boot/dts/apm-mustang.dts              |  34 --
 arch/arm64/boot/dts/apm-storm.dtsi               | 425 -----------------------
 arch/arm64/boot/dts/apm/Makefile                 |   5 +
 arch/arm64/boot/dts/apm/apm-mustang.dts          |  34 ++
 arch/arm64/boot/dts/apm/apm-storm.dtsi           | 425 +++++++++++++++++++++++
 arch/arm64/boot/dts/arm/Makefile                 |   6 +
 arch/arm64/boot/dts/arm/foundation-v8.dts        | 232 +++++++++++++
 arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts       | 159 +++++++++
 arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 240 +++++++++++++
 arch/arm64/boot/dts/foundation-v8.dts            | 232 -------------
 arch/arm64/boot/dts/rtsm_ve-aemv8a.dts           | 159 ---------
 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi     | 240 -------------
 scripts/Kbuild.include                           |   6 +
 scripts/Makefile.dtbinst                         |  51 +++
 scripts/Makefile.lib                             |  12 -
 19 files changed, 1179 insertions(+), 1124 deletions(-)
 delete mode 100644 arch/arm64/boot/dts/apm-mustang.dts
 delete mode 100644 arch/arm64/boot/dts/apm-storm.dtsi
 create mode 100644 arch/arm64/boot/dts/apm/Makefile
 create mode 100644 arch/arm64/boot/dts/apm/apm-mustang.dts
 create mode 100644 arch/arm64/boot/dts/apm/apm-storm.dtsi
 create mode 100644 arch/arm64/boot/dts/arm/Makefile
 create mode 100644 arch/arm64/boot/dts/arm/foundation-v8.dts
 create mode 100644 arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
 create mode 100644 arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi
 delete mode 100644 arch/arm64/boot/dts/foundation-v8.dts
 delete mode 100644 arch/arm64/boot/dts/rtsm_ve-aemv8a.dts
 delete mode 100644 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi
 create mode 100644 scripts/Makefile.dtbinst
Signature · 1 line
2.0.1
#1 lore raw

PATCH 1/6 dts, arm64: Add dtbs_install make target

From: Robert Richter <[email protected]>

This adds the dtbs_install make target to arm64. The target has been introduced already to arch/arm with the following commit:

f4d4ffc03efc kbuild: dtbs_install: new make target

Implementation for arm64 is the same as for arm.

With 'dtbs_install' all config enabled dtb files are installed to either the INSTALL_DTBS_PATH directory or the default location:

$INSTALL_PATH/dtbs/$KERNELRELEASE

---
 arch/arm64/Makefile          | 6 ++++--
 arch/arm64/boot/dts/Makefile | 4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)
arch/arm64/Makefile +4 -2
index 2df5e5daeebe..e0a8292bc832 100644
@@ -71,8 +71,9 @@ zinstall install: vmlinux
 %.dtb: scripts
 	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
 
-dtbs: scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts dtbs
+PHONY += dtbs dtbs_install
+dtbs dtbs_install: prepare scripts
+	$(Q)$(MAKE) $(build)=$(boot)/dts $@
 
 PHONY += vdso_install
 vdso_install:
@@ -86,6 +87,7 @@ define archhelp
   echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
   echo  '* dtbs          - Build device tree blobs for enabled boards'
+  echo  '  dtbs_install  - Install dtbs to $(INSTALL_DTBS_PATH)'
   echo  '  install       - Install uncompressed kernel'
   echo  '  zinstall      - Install compressed kernel'
   echo  '                  Install using (your) ~/bin/installkernel or'
arch/arm64/boot/dts/Makefile +3 -1
index c52bdb051f66..82e1c4cf8780 100644
@@ -1,9 +1,11 @@
 dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb
 dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
 
-targets += dtbs
+targets += dtbs dtbs_install
 targets += $(dtb-y)
 
 dtbs: $(addprefix $(obj)/, $(dtb-y))
 
 clean-files := *.dtb
+
+dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
Signature · 1 line
2.0.1
#2 lore raw

PATCH 2/6 dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst

In reply to Robert Richter

From: Robert Richter <[email protected]>

Move dtbs install rules to Makefile.dtbinst. This change is needed to implement support for dts vendor subdirs. The change makes Makefiles easier and smaller as no longer the dtbs_install rule needs to be defined. Another advantage is that install goals are not encoded in targets anymore (%.dtb_dtbinst_).

---
 arch/arm/Makefile            |  6 +++++-
 arch/arm/boot/dts/Makefile   |  2 --
 arch/arm64/Makefile          |  6 +++++-
 arch/arm64/boot/dts/Makefile |  2 --
 scripts/Kbuild.include       |  6 ++++++
 scripts/Makefile.dtbinst     | 38 ++++++++++++++++++++++++++++++++++++++
 scripts/Makefile.lib         | 12 ------------
 7 files changed, 54 insertions(+), 18 deletions(-)
 create mode 100644 scripts/Makefile.dtbinst
arch/arm/Makefile +5 -1
index 0ce9d0f71f2a..1963d9a9a2c4 100644
@@ -313,9 +313,13 @@ $(BOOT_TARGETS): vmlinux
 	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
 
 PHONY += dtbs dtbs_install
-dtbs dtbs_install: prepare scripts
+
+dtbs: prepare scripts
 	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $@
 
+dtbs_install:
+	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts MACHINE=$(MACHINE)
+
 # We use MRPROPER_FILES and CLEAN_FILES now
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
arch/arm/boot/dts/Makefile +0 -2
index b8c5cd3ddeb9..ab40afb87fb2 100644
@@ -502,5 +502,3 @@ dtbs: $(addprefix $(obj)/, $(dtb-y))
 	$(Q)rm -f $(obj)/../*.dtb
 
 clean-files := *.dtb
-
-dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
arch/arm64/Makefile +5 -1
index e0a8292bc832..1627861e9bbd 100644
@@ -72,9 +72,13 @@ zinstall install: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
 
 PHONY += dtbs dtbs_install
-dtbs dtbs_install: prepare scripts
+
+dtbs: prepare scripts
 	$(Q)$(MAKE) $(build)=$(boot)/dts $@
 
+dtbs_install:
+	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
+
 PHONY += vdso_install
 vdso_install:
 	$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
arch/arm64/boot/dts/Makefile +0 -2
index 82e1c4cf8780..0a14c3828301 100644
@@ -7,5 +7,3 @@ targets += $(dtb-y)
 dtbs: $(addprefix $(obj)/, $(dtb-y))
 
 clean-files := *.dtb
-
-dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
scripts/Kbuild.include +6 -0
index 8a9a4e1c7eab..861f5b4d48a2 100644
@@ -179,6 +179,12 @@ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
 # $(Q)$(MAKE) $(modbuiltin)=dir
 modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj
 
+###
+# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj=
+# Usage:
+# $(Q)$(MAKE) $(dtbinst)=dir
+dtbinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.dtbinst obj
+
 # Prefix -I with $(srctree) if it is not an absolute path.
 # skip if -I has no parameter
 addtree = $(if $(patsubst -I%,%,$(1)), \
scripts/Makefile.dtbinst new file +38 -0
new file mode 100644
index 000000000000..54286cccc289
@@ -0,0 +1,38 @@
+# ==========================================================================
+# Installing dtb files
+#
+# Installs all dtb files listed in $(dtb-y) either in the
+# INSTALL_DTBS_PATH directory or the default location:
+#
+#   $INSTALL_PATH/dtbs/$KERNELRELEASE
+#
+# ==========================================================================
+
+src := $(obj)
+
+PHONY := __dtbs_install
+__dtbs_install:
+
+include include/config/auto.conf
+include scripts/Kbuild.include
+include $(srctree)/$(obj)/Makefile
+
+PHONY += __dtbs_install_prep
+__dtbs_install_prep:
+	$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
+	$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
+	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
+
+dtbinst-files	:= $(dtb-y)
+
+# Helper targets for Installing DTBs into the boot directory
+quiet_cmd_dtb_install =	INSTALL $<
+      cmd_dtb_install =	cp $< $(2)
+
+$(dtbinst-files): %.dtb: $(obj)/%.dtb | __dtbs_install_prep
+	$(call cmd,dtb_install,$(INSTALL_DTBS_PATH))
+
+PHONY += $(dtbinst-files)
+__dtbs_install: $(dtbinst-files)
+
+.PHONY: $(PHONY)
scripts/Makefile.lib +0 -12
index 260bf8acfce9..83a453794266 100644
@@ -274,18 +274,6 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 
-# Helper targets for Installing DTBs into the boot directory
-quiet_cmd_dtb_install =	INSTALL $<
-      cmd_dtb_install =	cp $< $(2)
-
-_dtbinst_pre_:
-	$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
-	$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
-	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
-
-%.dtb_dtbinst_: $(obj)/%.dtb _dtbinst_pre_
-	$(call cmd,dtb_install,$(INSTALL_DTBS_PATH))
-
 # Bzip2
 # ---------------------------------------------------------------------------
 
Signature · 1 line
2.0.1
#3 lore raw

Re: [PATCH 2/6] dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst

Quoted 25 lines · Robert Richter

From: Robert Richter <[email protected]>

Move dtbs install rules to Makefile.dtbinst. This change is needed to implement support for dts vendor subdirs. The change makes Makefiles easier and smaller as no longer the dtbs_install rule needs to be defined. Another advantage is that install goals are not encoded in targets anymore (%.dtb_dtbinst_).

---
 arch/arm/Makefile            |  6 +++++-
 arch/arm/boot/dts/Makefile   |  2 --
 arch/arm64/Makefile          |  6 +++++-
 arch/arm64/boot/dts/Makefile |  2 --
 scripts/Kbuild.include       |  6 ++++++
 scripts/Makefile.dtbinst     | 38 ++++++++++++++++++++++++++++++++++++++
 scripts/Makefile.lib         | 12 ------------
 7 files changed, 54 insertions(+), 18 deletions(-)
 create mode 100644 scripts/Makefile.dtbinst
arch/arm/Makefile +0 -0
index 0ce9d0f71f2a..1963d9a9a2c4 100644

arch/arm/Makefile $(BOOT_TARGETS): vmlinux · line 321

Quoted 10 lines
arch/arm/Makefile +4 -1
@@ -313,9 +313,13 @@ $(BOOT_TARGETS): vmlinux
        $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
 
 PHONY += dtbs dtbs_install
-dtbs dtbs_install: prepare scripts
+
+dtbs: prepare scripts
        $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $@
 
+dtbs_install:
+       $(Q)$(MAKE) $(dtbinst)=$(boot)/dts MACHINE=$(MACHINE)

Can't you get rid of MACHINE here, too?

Rob

Quoted 130 lines
arch/arm/Makefile +1 -0
+
 # We use MRPROPER_FILES and CLEAN_FILES now
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
arch/arm/boot/dts/Makefile +0 -2
index b8c5cd3ddeb9..ab40afb87fb2 100644
@@ -502,5 +502,3 @@ dtbs: $(addprefix $(obj)/, $(dtb-y))
        $(Q)rm -f $(obj)/../*.dtb
 
 clean-files := *.dtb
-
-dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
arch/arm64/Makefile +5 -1
index e0a8292bc832..1627861e9bbd 100644
@@ -72,9 +72,13 @@ zinstall install: vmlinux
        $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
 
 PHONY += dtbs dtbs_install
-dtbs dtbs_install: prepare scripts
+
+dtbs: prepare scripts
        $(Q)$(MAKE) $(build)=$(boot)/dts $@
 
+dtbs_install:
+       $(Q)$(MAKE) $(dtbinst)=$(boot)/dts
+
 PHONY += vdso_install
 vdso_install:
        $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
arch/arm64/boot/dts/Makefile +0 -2
index 82e1c4cf8780..0a14c3828301 100644
@@ -7,5 +7,3 @@ targets += $(dtb-y)
 dtbs: $(addprefix $(obj)/, $(dtb-y))
 
 clean-files := *.dtb
-
-dtbs_install: $(addsuffix _dtbinst_, $(dtb-y))
scripts/Kbuild.include +6 -0
index 8a9a4e1c7eab..861f5b4d48a2 100644
@@ -179,6 +179,12 @@ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
 # $(Q)$(MAKE) $(modbuiltin)=dir
 modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj
 
+###
+# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj=
+# Usage:
+# $(Q)$(MAKE) $(dtbinst)=dir
+dtbinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.dtbinst obj
+
 # Prefix -I with $(srctree) if it is not an absolute path.
 # skip if -I has no parameter
 addtree = $(if $(patsubst -I%,%,$(1)), \
scripts/Makefile.dtbinst new file +38 -0
new file mode 100644
index 000000000000..54286cccc289
@@ -0,0 +1,38 @@
+# ==========================================================================
+# Installing dtb files
+#
+# Installs all dtb files listed in $(dtb-y) either in the
+# INSTALL_DTBS_PATH directory or the default location:
+#
+#   $INSTALL_PATH/dtbs/$KERNELRELEASE
+#
+# ==========================================================================
+
+src := $(obj)
+
+PHONY := __dtbs_install
+__dtbs_install:
+
+include include/config/auto.conf
+include scripts/Kbuild.include
+include $(srctree)/$(obj)/Makefile
+
+PHONY += __dtbs_install_prep
+__dtbs_install_prep:
+       $(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
+       $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
+       $(Q)mkdir -p $(INSTALL_DTBS_PATH)
+
+dtbinst-files  := $(dtb-y)
+
+# Helper targets for Installing DTBs into the boot directory
+quiet_cmd_dtb_install =        INSTALL $<
+      cmd_dtb_install =        cp $< $(2)
+
+$(dtbinst-files): %.dtb: $(obj)/%.dtb | __dtbs_install_prep
+       $(call cmd,dtb_install,$(INSTALL_DTBS_PATH))
+
+PHONY += $(dtbinst-files)
+__dtbs_install: $(dtbinst-files)
+
+.PHONY: $(PHONY)
scripts/Makefile.lib +0 -13
index 260bf8acfce9..83a453794266 100644
@@ -274,18 +274,6 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
 
 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
 
-# Helper targets for Installing DTBs into the boot directory
-quiet_cmd_dtb_install =        INSTALL $<
-      cmd_dtb_install =        cp $< $(2)
-
-_dtbinst_pre_:
-       $(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
-       $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
-       $(Q)mkdir -p $(INSTALL_DTBS_PATH)
-
-%.dtb_dtbinst_: $(obj)/%.dtb _dtbinst_pre_
-       $(call cmd,dtb_install,$(INSTALL_DTBS_PATH))
-
 # Bzip2
 # ---------------------------------------------------------------------------
 
--

2.0.1

#4 lore raw

Re: [PATCH 2/6] dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst

Quoted 34 lines · Rob Herring
Quoted 33 lines · Robert Richter

From: Robert Richter <[email protected]>

Move dtbs install rules to Makefile.dtbinst. This change is needed to implement support for dts vendor subdirs. The change makes Makefiles easier and smaller as no longer the dtbs_install rule needs to be defined. Another advantage is that install goals are not encoded in targets anymore (%.dtb_dtbinst_).

---
 arch/arm/Makefile            |  6 +++++-
 arch/arm/boot/dts/Makefile   |  2 --
 arch/arm64/Makefile          |  6 +++++-
 arch/arm64/boot/dts/Makefile |  2 --
 scripts/Kbuild.include       |  6 ++++++
 scripts/Makefile.dtbinst     | 38 ++++++++++++++++++++++++++++++++++++++
 scripts/Makefile.lib         | 12 ------------
 7 files changed, 54 insertions(+), 18 deletions(-)
 create mode 100644 scripts/Makefile.dtbinst
arch/arm/Makefile +2 -1
index 0ce9d0f71f2a..1963d9a9a2c4 100644
@@ -313,9 +313,13 @@ $(BOOT_TARGETS): vmlinux
        $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
 
 PHONY += dtbs dtbs_install
-dtbs dtbs_install: prepare scripts
+
+dtbs: prepare scripts
        $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $@
 
Quoted 4 lines

arch/arm/Makefile $(BOOT_TARGETS): vmlinux · line 321

Quoted 2 lines
arch/arm/Makefile +2 -0
+dtbs_install:
+       $(Q)$(MAKE) $(dtbinst)=$(boot)/dts MACHINE=$(MACHINE)

Can't you get rid of MACHINE here, too?

I moved this change to the end of this patch series to let maintainers the choise to drop the change if they are not fine with it.

-Robert

#5 lore raw

PATCH 3/6 dts, arm/arm64: Remove dtbs build rules in sub-makes

In reply to Robert Richter

From: Robert Richter <[email protected]>

Add dtb files to build targets and let kbuild handle them. Thus, special dtbs rules can be removed. This eases Makefiles and the implementation of the support of vendor dtb subdirectories.

---
 arch/arm/Makefile            |  2 +-
 arch/arm/boot/dts/Makefile   | 10 ++--------
 arch/arm64/Makefile          |  2 +-
 arch/arm64/boot/dts/Makefile |  8 ++------
 4 files changed, 6 insertions(+), 16 deletions(-)
arch/arm/Makefile +1 -1
index 1963d9a9a2c4..4d13c6d0a0cc 100644
@@ -315,7 +315,7 @@ $(BOOT_TARGETS): vmlinux
 PHONY += dtbs dtbs_install
 
 dtbs: prepare scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $@
+	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE)
 
 dtbs_install:
 	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts MACHINE=$(MACHINE)
arch/arm/boot/dts/Makefile +2 -8
index ab40afb87fb2..cb63c515247c 100644
@@ -492,13 +492,7 @@ dtb-$(CONFIG_MACH_DOVE) += dove-cm-a510.dtb \
 	dove-d3plug.dtb \
 	dove-dove-db.dtb
 
-targets += dtbs dtbs_install
-targets += $(dtb-y)
 endif
 
-# *.dtb used to be generated in the directory above. Clean out the
-# old build results so people don't accidentally use them.
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-	$(Q)rm -f $(obj)/../*.dtb
-
-clean-files := *.dtb
+always		:= $(dtb-y)
+clean-files	:= *.dtb
arch/arm64/Makefile +1 -1
index 1627861e9bbd..c21b21d6e72d 100644
@@ -74,7 +74,7 @@ zinstall install: vmlinux
 PHONY += dtbs dtbs_install
 
 dtbs: prepare scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts $@
+	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 dtbs_install:
 	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
arch/arm64/boot/dts/Makefile +2 -6
index 0a14c3828301..d116da5f2f20 100644
@@ -1,9 +1,5 @@
 dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb
 dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
 
-targets += dtbs dtbs_install
-targets += $(dtb-y)
-
-dtbs: $(addprefix $(obj)/, $(dtb-y))
-
-clean-files := *.dtb
+always		:= $(dtb-y)
+clean-files	:= *.dtb
Signature · 1 line
2.0.1
#6 lore raw

PATCH 4/6 dts, kbuild: Implement support for dtb vendor subdirs

In reply to Robert Richter

From: Robert Richter <[email protected]>

This patch adds support of vendor sub directories for dtb files. Subdirectories can be specified in $(dts-dirs). Kbuild traverses over all directories while building and installing dtb files. The directory tree is also reflected in the install path.

---
 arch/arm64/boot/dts/Makefile |  1 +
 scripts/Makefile.dtbinst     | 23 ++++++++++++++++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/Makefile +1 -0
index d116da5f2f20..9b8622532068 100644
@@ -2,4 +2,5 @@ dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb
 dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
 
 always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
 clean-files	:= *.dtb
scripts/Makefile.dtbinst +18 -5
index 54286cccc289..909ed7a2ac61 100644
@@ -6,6 +6,7 @@
 #
 #   $INSTALL_PATH/dtbs/$KERNELRELEASE
 #
+# Traverse through subdirectories listed in $(dts-dirs).
 # ==========================================================================
 
 src := $(obj)
@@ -13,26 +14,38 @@ src := $(obj)
 PHONY := __dtbs_install
 __dtbs_install:
 
+export dtbinst-root ?= $(obj)
+
 include include/config/auto.conf
 include scripts/Kbuild.include
 include $(srctree)/$(obj)/Makefile
 
 PHONY += __dtbs_install_prep
 __dtbs_install_prep:
+ifeq ("$(dtbinst-root)", "$(obj)")
 	$(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi
 	$(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi
 	$(Q)mkdir -p $(INSTALL_DTBS_PATH)
+endif
 
 dtbinst-files	:= $(dtb-y)
+dtbinst-dirs	:= $(dts-dirs)
 
 # Helper targets for Installing DTBs into the boot directory
 quiet_cmd_dtb_install =	INSTALL $<
-      cmd_dtb_install =	cp $< $(2)
+      cmd_dtb_install =	mkdir -p $(2); cp $< $(2)
+
+install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj))
+
+$(dtbinst-files) $(dtbinst-dirs): | __dtbs_install_prep
+
+$(dtbinst-files): %.dtb: $(obj)/%.dtb
+	$(call cmd,dtb_install,$(install-dir))
 
-$(dtbinst-files): %.dtb: $(obj)/%.dtb | __dtbs_install_prep
-	$(call cmd,dtb_install,$(INSTALL_DTBS_PATH))
+$(dtbinst-dirs):
+	$(Q)$(MAKE) $(dtbinst)=$(obj)/$@
 
-PHONY += $(dtbinst-files)
-__dtbs_install: $(dtbinst-files)
+PHONY += $(dtbinst-files) $(dtbinst-dirs)
+__dtbs_install: $(dtbinst-files) $(dtbinst-dirs)
 
 .PHONY: $(PHONY)
Signature · 1 line
2.0.1
#7 lore raw

PATCH 5/6 dts, arm64: Move dts files to vendor subdirs

In reply to Robert Richter

From: Robert Richter <[email protected]>

Moving dts files to vendor subdirs.

---
 arch/arm64/boot/dts/Makefile                     |   4 +-
 arch/arm64/boot/dts/apm-mustang.dts              |  34 --
 arch/arm64/boot/dts/apm-storm.dtsi               | 425 -----------------------
 arch/arm64/boot/dts/apm/Makefile                 |   5 +
 arch/arm64/boot/dts/apm/apm-mustang.dts          |  34 ++
 arch/arm64/boot/dts/apm/apm-storm.dtsi           | 425 +++++++++++++++++++++++
 arch/arm64/boot/dts/arm/Makefile                 |   6 +
 arch/arm64/boot/dts/arm/foundation-v8.dts        | 232 +++++++++++++
 arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts       | 159 +++++++++
 arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 240 +++++++++++++
 arch/arm64/boot/dts/foundation-v8.dts            | 232 -------------
 arch/arm64/boot/dts/rtsm_ve-aemv8a.dts           | 159 ---------
 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi     | 240 -------------
 13 files changed, 1103 insertions(+), 1092 deletions(-)
 delete mode 100644 arch/arm64/boot/dts/apm-mustang.dts
 delete mode 100644 arch/arm64/boot/dts/apm-storm.dtsi
 create mode 100644 arch/arm64/boot/dts/apm/Makefile
 create mode 100644 arch/arm64/boot/dts/apm/apm-mustang.dts
 create mode 100644 arch/arm64/boot/dts/apm/apm-storm.dtsi
 create mode 100644 arch/arm64/boot/dts/arm/Makefile
 create mode 100644 arch/arm64/boot/dts/arm/foundation-v8.dts
 create mode 100644 arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts
 create mode 100644 arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi
 delete mode 100644 arch/arm64/boot/dts/foundation-v8.dts
 delete mode 100644 arch/arm64/boot/dts/rtsm_ve-aemv8a.dts
 delete mode 100644 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi
arch/arm64/boot/dts/Makefile +2 -2
index 9b8622532068..309c3dc4bb70 100644
@@ -1,5 +1,5 @@
-dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb foundation-v8.dtb
-dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
+dts-dirs += apm
+dts-dirs += arm
 
 always		:= $(dtb-y)
 subdir-y	:= $(dts-dirs)
arch/arm64/boot/dts/apm-mustang.dts deleted +0 -34
deleted file mode 100644
index b2f56229aa5e..000000000000
@@ -1,34 +0,0 @@
-/*
- * dts file for AppliedMicro (APM) Mustang Board
- *
- * Copyright (C) 2013, Applied Micro Circuits Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- */
-
-/dts-v1/;
-
-/include/ "apm-storm.dtsi"
-
-/ {
-	model = "APM X-Gene Mustang board";
-	compatible = "apm,mustang", "apm,xgene-storm";
-
-	chosen { };
-
-	memory {
-		device_type = "memory";
-		reg = < 0x1 0x00000000 0x0 0x80000000 >; /* Updated by bootloader */
-	};
-};
-
-&serial0 {
-	status = "ok";
-};
-
-&menet {
-	status = "ok";
-};
arch/arm64/boot/dts/apm-storm.dtsi deleted +0 -425

425 lines not on this page · raw message

arch/arm64/boot/dts/apm/Makefile new file +5 -0
new file mode 100644
index 000000000000..a2afabbc1717
@@ -0,0 +1,5 @@
+dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
arch/arm64/boot/dts/apm/apm-mustang.dts new file +34 -0
new file mode 100644
index 000000000000..b2f56229aa5e
@@ -0,0 +1,34 @@
+/*
+ * dts file for AppliedMicro (APM) Mustang Board
+ *
+ * Copyright (C) 2013, Applied Micro Circuits Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ */
+
+/dts-v1/;
+
+/include/ "apm-storm.dtsi"
+
+/ {
+	model = "APM X-Gene Mustang board";
+	compatible = "apm,mustang", "apm,xgene-storm";
+
+	chosen { };
+
+	memory {
+		device_type = "memory";
+		reg = < 0x1 0x00000000 0x0 0x80000000 >; /* Updated by bootloader */
+	};
+};
+
+&serial0 {
+	status = "ok";
+};
+
+&menet {
+	status = "ok";
+};
arch/arm64/boot/dts/apm/apm-storm.dtsi new file +425 -0

425 lines not on this page · raw message

arch/arm64/boot/dts/arm/Makefile new file +6 -0
new file mode 100644
index 000000000000..43d1404bb3c1
@@ -0,0 +1,6 @@
+dtb-$(CONFIG_ARCH_VEXPRESS) += foundation-v8.dtb
+dtb-$(CONFIG_ARCH_VEXPRESS) += rtsm_ve-aemv8a.dtb
+
+always		:= $(dtb-y)
+subdir-y	:= $(dts-dirs)
+clean-files	:= *.dtb
arch/arm64/boot/dts/arm/foundation-v8.dts new file +232 -0

232 lines not on this page · raw message

arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts new file +159 -0

159 lines not on this page · raw message

arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi new file +240 -0

240 lines not on this page · raw message

arch/arm64/boot/dts/foundation-v8.dts deleted +0 -232

232 lines not on this page · raw message

arch/arm64/boot/dts/rtsm_ve-aemv8a.dts deleted +0 -159

159 lines not on this page · raw message

arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi deleted +0 -240

240 lines not on this page · raw message

Signature · 1 line
2.0.1
Acked-by on v1 5/6
#8 lore raw

Re: [PATCH 5/6] dts, arm64: Move dts files to vendor subdirs

Quoted 5 lines · Robert Richter

From: Robert Richter <[email protected]>

Moving dts files to vendor subdirs.

Quoted 15 lines
---
 arch/arm64/boot/dts/Makefile                     |   4 +-
 arch/arm64/boot/dts/apm-mustang.dts              |  34 --
 arch/arm64/boot/dts/apm-storm.dtsi               | 425 -----------------------
 arch/arm64/boot/dts/apm/Makefile                 |   5 +
 arch/arm64/boot/dts/apm/apm-mustang.dts          |  34 ++
 arch/arm64/boot/dts/apm/apm-storm.dtsi           | 425 +++++++++++++++++++++++
 arch/arm64/boot/dts/arm/Makefile                 |   6 +
 arch/arm64/boot/dts/arm/foundation-v8.dts        | 232 +++++++++++++
 arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts       | 159 +++++++++
 arch/arm64/boot/dts/arm/rtsm_ve-motherboard.dtsi | 240 +++++++++++++
 arch/arm64/boot/dts/foundation-v8.dts            | 232 -------------
 arch/arm64/boot/dts/rtsm_ve-aemv8a.dts           | 159 ---------
 arch/arm64/boot/dts/rtsm_ve-motherboard.dtsi     | 240 -------------
 13 files changed, 1103 insertions(+), 1092 deletions(-)

This should be sent with renames enabled (-M option). You can enable it by default with this in your git config:

[diff]
renames = true

Otherwise,

Rob

#9 lore raw

PATCH 6/6 dts, arm: Remove $(MACHINE) variable from dtbs make recipes

In reply to Robert Richter

From: Robert Richter <[email protected]>

The machine description is not needed to build dtb files.

---
 arch/arm/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/Makefile +2 -2
index 4d13c6d0a0cc..422c9aa34382 100644
@@ -315,10 +315,10 @@ $(BOOT_TARGETS): vmlinux
 PHONY += dtbs dtbs_install
 
 dtbs: prepare scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE)
+	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 dtbs_install:
-	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts MACHINE=$(MACHINE)
+	$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
 
 # We use MRPROPER_FILES and CLEAN_FILES now
 archclean:
Signature · 1 line
2.0.1
Tested-by on the v1 series
#10 lore raw
In reply to Robert Richter

Robert,

Quoted 29 lines

For arm64 we want to put dts files into vendor's subdirectories from the beginning. This patch set implements this. As this is a generic kbuild implementation, vendor subdirs will be also available for arch/arm and other architectures. The subdirectory tree is also reflected in the install path.

A new makefile variable dts-dirs is introduced to point to dts subdirs. This variable is used by kbuild for building and installation of dtb files.

A dts Makefile looks now as follows:

----
dtb-$(CONFIG_...) += some_file_1.dtb
dtb-$(CONFIG_...) += some_file_2.dtb

dts-dirs += dir_vendor_a
dts-dirs += dir_vendor_b

# come always afterwards:
always         := $(dtb-y)
subdir-y       := $(dts-dirs)
clean-files    := *.dtb
----

This patches also introduces the dtbs_install make target for arm64. Install rules are moved to Makefile.dtbinst using the same style and calling convention like for modinst and fwinst.

Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

I've tested this for arm64 and by adding a vendor sub-directory locally for arm. This series is also the base for my MIPS DT vendor sub-directory series
(http://www.linux-mips.org/archives/linux-mips/2014-09/msg00217.html).
So, for the entire series,

#11 lore raw
Quoted 8 lines · Andrew Bresticker
Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

Quoted 7 lines

I've tested this for arm64 and by adding a vendor sub-directory locally for arm. This series is also the base for my MIPS DT vendor sub-directory series
(http://www.linux-mips.org/archives/linux-mips/2014-09/msg00217.html).
So, for the entire series,

Andrew, thanks for testing and great this also works on mips.

Anyone willing to take the patches for 3.18? Are any further acks needed?

Thanks,

-Robert

maintainer Acked-by
#12 lore raw
Quoted 15 lines · Robert Richter
Quoted 14 lines · Andrew Bresticker
Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

I've tested this for arm64 and by adding a vendor sub-directory locally for arm. This series is also the base for my MIPS DT vendor sub-directory series
(http://www.linux-mips.org/archives/linux-mips/2014-09/msg00217.html).
So, for the entire series,

Quoted 6 lines
Quoted 1 line

Andrew, thanks for testing and great this also works on mips.

Anyone willing to take the patches for 3.18? Are any further acks needed?

For the arm64 bits in this series:

I think the patches can be merged via arm-soc.

#13 lore raw
Quoted 20 lines · Catalin Marinas
Quoted 19 lines · Robert Richter
Quoted 8 lines · Andrew Bresticker
Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

Quoted 7 lines

I've tested this for arm64 and by adding a vendor sub-directory locally for arm. This series is also the base for my MIPS DT vendor sub-directory series
(http://www.linux-mips.org/archives/linux-mips/2014-09/msg00217.html).
So, for the entire series,

Andrew, thanks for testing and great this also works on mips.

Quoted 8 lines
Quoted 2 lines

Anyone willing to take the patches for 3.18? Are any further acks needed?

For the arm64 bits in this series:

I think the patches can be merged via arm-soc.

Olof,

please apply the patches.

Thanks,

-Robert

#14 lore raw
Quoted 26 lines · Robert Richter
Quoted 25 lines · Catalin Marinas
Quoted 15 lines · Robert Richter
Quoted 14 lines · Andrew Bresticker
Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

I've tested this for arm64 and by adding a vendor sub-directory locally for arm. This series is also the base for my MIPS DT vendor sub-directory series
(http://www.linux-mips.org/archives/linux-mips/2014-09/msg00217.html).
So, for the entire series,

Quoted 6 lines
Quoted 1 line

Andrew, thanks for testing and great this also works on mips.

Anyone willing to take the patches for 3.18? Are any further acks needed?

For the arm64 bits in this series:

Quoted 7 lines
Quoted 3 lines

I think the patches can be merged via arm-soc.

Olof,

please apply the patches.

Olof, Arnd,

you may want to pull from here alternatively.

Thanks,

-Robert

The following changes since commit a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee:

Linux 3.16-rc2 (2014-06-21 19:02:54 -1000)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/rric/linux.git tags/dts-subdirs-for-arm-soc-v3.18

for you to fetch changes up to 87bdf4d8625e50d99b56aa2590a2261049a5fd48:

  dts, arm: Remove $(MACHINE) variable from dtbs make recipes (2014-09-03 21:46:49 +0200)

----------------------------------------------------------------
dts, kbuild: Implement support for dtb vendor subdirs

----------------------------------------------------------------
Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

 arch/arm/Makefile                                  |  8 +++-
 arch/arm/boot/dts/Makefile                         | 12 +-----
 arch/arm64/Makefile                                | 10 ++++-
 arch/arm64/boot/dts/Makefile                       | 13 +++---
 arch/arm64/boot/dts/apm/Makefile                   |  5 +++
 arch/arm64/boot/dts/{ => apm}/apm-mustang.dts      |  0
 arch/arm64/boot/dts/{ => apm}/apm-storm.dtsi       |  0
 arch/arm64/boot/dts/arm/Makefile                   |  6 +++
 arch/arm64/boot/dts/{ => arm}/foundation-v8.dts    |  0
 arch/arm64/boot/dts/{ => arm}/rtsm_ve-aemv8a.dts   |  0
 .../boot/dts/{ => arm}/rtsm_ve-motherboard.dtsi    |  0
 scripts/Kbuild.include                             |  6 +++
 scripts/Makefile.dtbinst                           | 50 ++++++++++++++++++++++
 scripts/Makefile.lib                               | 12 ------
 14 files changed, 88 insertions(+), 34 deletions(-)
 create mode 100644 arch/arm64/boot/dts/apm/Makefile
 rename arch/arm64/boot/dts/{ => apm}/apm-mustang.dts (100%)
 rename arch/arm64/boot/dts/{ => apm}/apm-storm.dtsi (100%)
 create mode 100644 arch/arm64/boot/dts/arm/Makefile
 rename arch/arm64/boot/dts/{ => arm}/foundation-v8.dts (100%)
 rename arch/arm64/boot/dts/{ => arm}/rtsm_ve-aemv8a.dts (100%)
 rename arch/arm64/boot/dts/{ => arm}/rtsm_ve-motherboard.dtsi (100%)
 create mode 100644 scripts/Makefile.dtbinst
#15 lore raw

Hello Robert,

Quoted 31 lines · Robert Richter
Quoted 30 lines · Robert Richter
Quoted 28 lines · Catalin Marinas
Quoted 15 lines · Robert Richter
Quoted 14 lines · Andrew Bresticker
Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

I've tested this for arm64 and by adding a vendor sub-directory locally for arm. This series is also the base for my MIPS DT vendor sub-directory series
(http://www.linux-mips.org/archives/linux-mips/2014-09/msg00217.html).
So, for the entire series,

Quoted 6 lines
Quoted 1 line

Andrew, thanks for testing and great this also works on mips.

Anyone willing to take the patches for 3.18? Are any further acks needed?

For the arm64 bits in this series:

I think the patches can be merged via arm-soc.

Quoted 7 lines
Quoted 3 lines

Olof,

please apply the patches.

Olof, Arnd,

you may want to pull from here alternatively.

I have been using your patchset as the base for my new arm64 SoC support (http://www.spinics.net/lists/linux-samsung-soc/msg37047.html).
Are you planning to rebase and send this again as some of the patches did not apply cleanly for me on linux-next.

Regards,
Abhilash

Quoted 58 lines

Thanks,

-Robert

The following changes since commit a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee:

Linux 3.16-rc2 (2014-06-21 19:02:54 -1000)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/rric/linux.git tags/dts-subdirs-for-arm-soc-v3.18

for you to fetch changes up to 87bdf4d8625e50d99b56aa2590a2261049a5fd48:

  dts, arm: Remove $(MACHINE) variable from dtbs make recipes (2014-09-03 21:46:49 +0200)

----------------------------------------------------------------
dts, kbuild: Implement support for dtb vendor subdirs

----------------------------------------------------------------
Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

 arch/arm/Makefile                                  |  8 +++-
 arch/arm/boot/dts/Makefile                         | 12 +-----
 arch/arm64/Makefile                                | 10 ++++-
 arch/arm64/boot/dts/Makefile                       | 13 +++---
 arch/arm64/boot/dts/apm/Makefile                   |  5 +++
 arch/arm64/boot/dts/{ => apm}/apm-mustang.dts      |  0
 arch/arm64/boot/dts/{ => apm}/apm-storm.dtsi       |  0
 arch/arm64/boot/dts/arm/Makefile                   |  6 +++
 arch/arm64/boot/dts/{ => arm}/foundation-v8.dts    |  0
 arch/arm64/boot/dts/{ => arm}/rtsm_ve-aemv8a.dts   |  0
 .../boot/dts/{ => arm}/rtsm_ve-motherboard.dtsi    |  0
 scripts/Kbuild.include                             |  6 +++
 scripts/Makefile.dtbinst                           | 50 ++++++++++++++++++++++
 scripts/Makefile.lib                               | 12 ------
 14 files changed, 88 insertions(+), 34 deletions(-)
 create mode 100644 arch/arm64/boot/dts/apm/Makefile
 rename arch/arm64/boot/dts/{ => apm}/apm-mustang.dts (100%)
 rename arch/arm64/boot/dts/{ => apm}/apm-storm.dtsi (100%)
 create mode 100644 arch/arm64/boot/dts/arm/Makefile
 rename arch/arm64/boot/dts/{ => arm}/foundation-v8.dts (100%)
 rename arch/arm64/boot/dts/{ => arm}/rtsm_ve-aemv8a.dts (100%)
 rename arch/arm64/boot/dts/{ => arm}/rtsm_ve-motherboard.dtsi (100%)
 create mode 100644 scripts/Makefile.dtbinst

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#16 lore raw
Quoted 8 lines · Abhilash Kesavan
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

Quoted 6 lines
Quoted 1 line

you may want to pull from here alternatively.

I have been using your patchset as the base for my new arm64 SoC support (http://www.spinics.net/lists/linux-samsung-soc/msg37047.html).
Are you planning to rebase and send this again as some of the patches did not apply cleanly for me on linux-next.

Yes, I will rebase it and resend the pull request this week.

-Robert

#17 lore raw
In reply to Robert Richter

Arnd,

Quoted 31 lines · Robert Richter

From: Robert Richter <[email protected]>

For arm64 we want to put dts files into vendor's subdirectories from the beginning. This patch set implements this. As this is a generic kbuild implementation, vendor subdirs will be also available for arch/arm and other architectures. The subdirectory tree is also reflected in the install path.

A new makefile variable dts-dirs is introduced to point to dts subdirs. This variable is used by kbuild for building and installation of dtb files.

A dts Makefile looks now as follows:

----
dtb-$(CONFIG_...) += some_file_1.dtb
dtb-$(CONFIG_...) += some_file_2.dtb

dts-dirs += dir_vendor_a
dts-dirs += dir_vendor_b

# come always afterwards:
always         := $(dtb-y)
subdir-y       := $(dts-dirs)
clean-files    := *.dtb
----

This patches also introduces the dtbs_install make target for arm64. Install rules are moved to Makefile.dtbinst using the same style and calling convention like for modinst and fwinst.

Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

please pull this series for inclusion into v3.19 from:

git://git.kernel.org/pub/scm/linux/kernel/git/rric/linux.git dts-subdirs-for-arm-soc-v3.19

I have updated and rebased the patches to v3.18-rc1. No changes except conflict resolution of patch 5/6.

Thanks,

-Robert

The following changes since commit f114040e3ea6e07372334ade75d1ee0775c355e1:

Linux 3.18-rc1 (2014-10-19 18:08:38 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/rric/linux.git dts-subdirs-for-arm-soc-v3.19

for you to fetch changes up to 6f889d8ba125693778e05f0166b963cf08fed930:

  dts, arm: Remove $(MACHINE) variable from dtbs make recipes (2014-10-21 18:07:00 +0200)

----------------------------------------------------------------
dts, kbuild: Implement support for dtb vendor subdirs

----------------------------------------------------------------
Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

 arch/arm/Makefile                                  |  8 +++-
 arch/arm/boot/dts/Makefile                         | 12 +----
 arch/arm64/Makefile                                | 10 ++++-
 arch/arm64/boot/dts/Makefile                       | 15 +++----
 arch/arm64/boot/dts/apm/Makefile                   |  5 +++
 arch/arm64/boot/dts/{ => apm}/apm-mustang.dts      |  0
 arch/arm64/boot/dts/{ => apm}/apm-storm.dtsi       |  0
 arch/arm64/boot/dts/arm/Makefile                   |  6 +++
 arch/arm64/boot/dts/{ => arm}/foundation-v8.dts    |  0
 arch/arm64/boot/dts/{ => arm}/rtsm_ve-aemv8a.dts   |  0
 .../boot/dts/{ => arm}/rtsm_ve-motherboard.dtsi    |  0
 arch/arm64/boot/dts/cavium/Makefile                |  5 +++
 arch/arm64/boot/dts/{ => cavium}/thunder-88xx.dts  |  0
 arch/arm64/boot/dts/{ => cavium}/thunder-88xx.dtsi |  0
 scripts/Kbuild.include                             |  6 +++
 scripts/Makefile.dtbinst                           | 51 ++++++++++++++++++++++
 scripts/Makefile.lib                               | 12 -----
 17 files changed, 95 insertions(+), 35 deletions(-)
 create mode 100644 arch/arm64/boot/dts/apm/Makefile
 rename arch/arm64/boot/dts/{ => apm}/apm-mustang.dts (100%)
 rename arch/arm64/boot/dts/{ => apm}/apm-storm.dtsi (100%)
 create mode 100644 arch/arm64/boot/dts/arm/Makefile
 rename arch/arm64/boot/dts/{ => arm}/foundation-v8.dts (100%)
 rename arch/arm64/boot/dts/{ => arm}/rtsm_ve-aemv8a.dts (100%)
 rename arch/arm64/boot/dts/{ => arm}/rtsm_ve-motherboard.dtsi (100%)
 create mode 100644 arch/arm64/boot/dts/cavium/Makefile
 rename arch/arm64/boot/dts/{ => cavium}/thunder-88xx.dts (100%)
 rename arch/arm64/boot/dts/{ => cavium}/thunder-88xx.dtsi (100%)
 create mode 100644 scripts/Makefile.dtbinst
#18 lore raw

Arnd,

Quoted 6 lines · Robert Richter

please pull this series for inclusion into v3.19 from:

git://git.kernel.org/pub/scm/linux/kernel/git/rric/linux.git dts-subdirs-for-arm-soc-v3.19

I have updated and rebased the patches to v3.18-rc1. No changes except conflict resolution of patch 5/6.

have you had the chance to look at this?

Thanks,

-Robert

#19 lore raw
In reply to Robert Richter
Quoted 42 lines · Robert Richter

Arnd,

Quoted 31 lines · Robert Richter

From: Robert Richter <[email protected]>

For arm64 we want to put dts files into vendor's subdirectories from the beginning. This patch set implements this. As this is a generic kbuild implementation, vendor subdirs will be also available for arch/arm and other architectures. The subdirectory tree is also reflected in the install path.

A new makefile variable dts-dirs is introduced to point to dts subdirs. This variable is used by kbuild for building and installation of dtb files.

A dts Makefile looks now as follows:

----
dtb-$(CONFIG_...) += some_file_1.dtb
dtb-$(CONFIG_...) += some_file_2.dtb

dts-dirs += dir_vendor_a
dts-dirs += dir_vendor_b

# come always afterwards:
always         := $(dtb-y)
subdir-y       := $(dts-dirs)
clean-files    := *.dtb
----

This patches also introduces the dtbs_install make target for arm64. Install rules are moved to Makefile.dtbinst using the same style and calling convention like for modinst and fwinst.

Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

Quoted 6 lines

please pull this series for inclusion into v3.19 from:

git://git.kernel.org/pub/scm/linux/kernel/git/rric/linux.git dts-subdirs-for-arm-soc-v3.19

I have updated and rebased the patches to v3.18-rc1. No changes except conflict resolution of patch 5/6.

Pulled, and I added the description from 0/6 as the merge text -- feel free to add it to the tag if you do something like this in the future.

-Olof

#20 lore raw
Quoted 10 lines · Olof Johansson
Quoted 10 lines
Quoted 7 lines

Robert Richter (6):
dts, arm64: Add dtbs_install make target
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst dts, arm/arm64: Remove dtbs build rules in sub-makes dts, kbuild: Implement support for dtb vendor subdirs dts, arm64: Move dts files to vendor subdirs
dts, arm: Remove $(MACHINE) variable from dtbs make recipes

please pull this series for inclusion into v3.19 from:

Quoted 7 lines
Quoted 4 lines

git://git.kernel.org/pub/scm/linux/kernel/git/rric/linux.git dts-subdirs-for-arm-soc-v3.19

I have updated and rebased the patches to v3.18-rc1. No changes except conflict resolution of patch 5/6.

Pulled, and I added the description from 0/6 as the merge text -- feel free to add it to the tag if you do something like this in the future.

Thanks for pulling and the hint on the tag description (I was wondering what to put in there).

-Robert