[U-Boot] [PATCH v2 8/9] sandbox: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Thomas Chou thomas at wytron.com.tw
Wed Jan 6 02:49:31 CET 2016


Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that
there is no need to list all the dtb for different targets/boards
in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the
list will be compiled. The first will be used as default to ship.

Signed-off-by: Thomas Chou <thomas at wytron.com.tw>
---
v2
  add list support as Simon suggested.

 arch/sandbox/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/sandbox/dts/Makefile b/arch/sandbox/dts/Makefile
index 0197569..7260256 100644
--- a/arch/sandbox/dts/Makefile
+++ b/arch/sandbox/dts/Makefile
@@ -2,7 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_SANDBOX) += sandbox.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 dtb-$(CONFIG_UT_DM) += test.dtb
 
 targets += $(dtb-y)
-- 
2.5.0



More information about the U-Boot mailing list