diff mbox series

[RFC,01/13] ARM: dts: allow building .dtb files under platform subdirs

Message ID 1523956215-28154-2-git-send-email-t-kristo@ti.com
State New
Headers show
Series ARM: dts: DT overlay support infra + some data | expand

Commit Message

Tero Kristo April 17, 2018, 9:10 a.m. UTC
Add support to base ARM makefile for building .dtb files under platform
specific subdirs (e.g. arch/arm/boot/dts/ti for TI SoCs.)

Signed-off-by: Tero Kristo <t-kristo@ti.com>

---
 arch/arm/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
1.9.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rob Herring April 19, 2018, 12:02 a.m. UTC | #1
On Tue, Apr 17, 2018 at 4:10 AM, Tero Kristo <t-kristo@ti.com> wrote:
> Add support to base ARM makefile for building .dtb files under platform

> specific subdirs (e.g. arch/arm/boot/dts/ti for TI SoCs.)

>

> Signed-off-by: Tero Kristo <t-kristo@ti.com>

> ---

>  arch/arm/Makefile | 4 +++-

>  1 file changed, 3 insertions(+), 1 deletion(-)

>

> diff --git a/arch/arm/Makefile b/arch/arm/Makefile

> index e4e537f..f6c90bc 100644

> --- a/arch/arm/Makefile

> +++ b/arch/arm/Makefile

> @@ -343,8 +343,10 @@ $(BOOT_TARGETS): vmlinux

>  $(INSTALL_TARGETS):

>         $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@

>

> +%.dtb: dtbdir=$(patsubst %/,%,$(patsubst %./,%,$(boot)/dts/$(dir $@)))


I'd expect this to look more like the arm64 version and just add
'subdir-y' entries in the boot/dts/Makefile.

> +

>  %.dtb: | scripts

> -       $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@

> +       $(Q)$(MAKE) $(build)=$(dtbdir) MACHINE=$(MACHINE) $(boot)/dts/$@


We can drop MACHINE here.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index e4e537f..f6c90bc 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -343,8 +343,10 @@  $(BOOT_TARGETS): vmlinux
 $(INSTALL_TARGETS):
 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
 
+%.dtb: dtbdir=$(patsubst %/,%,$(patsubst %./,%,$(boot)/dts/$(dir $@)))
+
 %.dtb: | scripts
-	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
+	$(Q)$(MAKE) $(build)=$(dtbdir) MACHINE=$(MACHINE) $(boot)/dts/$@
 
 PHONY += dtbs dtbs_install