Message ID | 1452044972-17992-2-git-send-email-thomas@wytron.com.tw |
---|---|
State | Rejected |
Delegated to: | Simon Glass |
Headers | show |
Hi Thomas, On 5 January 2016 at 18:49, Thomas Chou <thomas@wytron.com.tw> wrote: > 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@wytron.com.tw> > --- > v2 > add list support as Simon suggested. > > dts/Kconfig | 3 ++- > dts/Makefile | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) On balance I still prefer the current Makefile approach. Regards, Simon
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
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@wytron.com.tw> --- v2 add list support as Simon suggested. dts/Kconfig | 3 ++- dts/Makefile | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)