[U-Boot] [PATCH v2 2/9] devicetree: support list of Device Tree in DEFAULT_DEVICE_TREE

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


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.

 dts/Kconfig  | 3 ++-
 dts/Makefile | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dts/Kconfig b/dts/Kconfig
index fb2d79e..8d8b448 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -54,7 +54,8 @@ endchoice
 config DEFAULT_DEVICE_TREE
 	string "Default Device Tree for DT control"
 	help
-	  This option specifies the default Device Tree used for DT control.
+	  This option specifies a space-separated list of Device Tree used
+	  for DT control. The first will be used as default to ship.
 	  It can be overridden from the command line:
 	  $ make DEVICE_TREE=<device-tree-name>
 
diff --git a/dts/Makefile b/dts/Makefile
index dbde703..8278caf 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -7,7 +7,8 @@
 # This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is
 # enabled. See doc/README.fdt-control for more details.
 
-DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+DEVICE_TREE ?= $(firstword $(DEVICE_TREE_LIST))
 ifeq ($(DEVICE_TREE),)
 DEVICE_TREE := unset
 endif
-- 
2.5.0



More information about the U-Boot mailing list