Browse Source

arm64: enable .dtbo file building for TI arm64 SoCs

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>
Tero Kristo 7 years ago
parent
commit
548d795825
2 changed files with 9 additions and 2 deletions
  1. 4 2
      arch/arm64/Makefile
  2. 5 0
      arch/arm64/boot/dts/ti/Makefile

+ 4 - 2
arch/arm64/Makefile

@@ -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
 

+ 5 - 0
arch/arm64/boot/dts/ti/Makefile

@@ -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)