arm64: enable .dtbo file building for TI arm64 SoCs
authorTero Kristo <t-kristo@ti.com>
Sun, 17 Jun 2018 19:30:39 +0000 (22:30 +0300)
committerTero Kristo <t-kristo@ti.com>
Fri, 23 Nov 2018 08:14:54 +0000 (10:14 +0200)
Add support for building .dtso files into .dtbo binaries. Also change
the base .dtb files to contain symbols for overlay applying purposes.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
arch/arm64/Makefile
arch/arm64/boot/dts/ti/Makefile

index 106039d25e2f7a708b81db27d7c95ae82aaa54dc..62283944d329b3e88f2a872f765f5fd5d2a530ad 100644 (file)
@@ -127,8 +127,10 @@ Image.%: Image
 zinstall install:
        $(Q)$(MAKE) $(build)=$(boot) $@
 
-%.dtb: scripts
-       $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
+%.dtb %.dtbo: dtbdir=$(patsubst %/,%,$(patsubst %./,%,$(boot)/dts/$(dir $@)))
+
+%.dtb %.dtbo: scripts
+       $(Q)$(MAKE) $(build)=$(dtbdir) $(boot)/dts/$@
 
 PHONY += dtbs dtbs_install
 
index 63e619d0b5b81eeac7681dc93450216e3d5791f4..439c74e141d3c304fad4f039324dc0b6af6f0931 100644 (file)
@@ -6,4 +6,9 @@
 # Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/
 #
 
+DTC_FLAGS += -@
+
 dtb-$(CONFIG_ARCH_K3_AM6_SOC) += k3-am654-base-board.dtb
+
+$(obj)/%.dtbo: $(src)/%.dtso FORCE
+       $(call if_changed_dep,dtc)