diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-02-05 11:28:27 +0900 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-02-19 11:10:05 -0500 |
commit | 3284c8b8cad9452bf0711f52699bc9a5aeb83319 (patch) | |
tree | 104fa98297b97ac0ba9df772714c0cd8fc766d2e /dts | |
parent | 5ab502cb8900aee483dfba28700640672e0b060e (diff) | |
download | u-boot-imx-3284c8b8cad9452bf0711f52699bc9a5aeb83319.zip u-boot-imx-3284c8b8cad9452bf0711f52699bc9a5aeb83319.tar.gz u-boot-imx-3284c8b8cad9452bf0711f52699bc9a5aeb83319.tar.bz2 |
dts: generate multiple device tree blobs
It is convenient to have all device trees on the same SoC compiled.
It allows for later easy repackaging without the need to re-run
the make file.
- Build device trees with the same SoC under arch/$(ARCH)/dts
- Copy the one specified by CONFIG_DEFAULT_DEVICE_TREE or
DEVICE_TREE=... to dts/dt.dtb
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'dts')
-rw-r--r-- | dts/Makefile | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/dts/Makefile b/dts/Makefile index 5d2abd9..9907463 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -9,24 +9,30 @@ DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) ifeq ($(DEVICE_TREE),) -DEVICE_TREE := notfound +DEVICE_TREE := unset endif -DTS := $(srctree)/arch/$(ARCH)/dts/$(DEVICE_TREE).dts +DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb -DTC_FLAGS += -R 4 -p 0x1000 +quiet_cmd_copy = COPY $@ + cmd_copy = cp $< $@ -$(obj)/dt.dtb: $(DTS) FORCE - $(call if_changed_dep,dtc) +$(obj)/dt.dtb: $(DTB) FORCE + $(call if_changed,copy) targets += dt.dtb -$(DTS): - @echo >&2 - @echo >&2 "Device Tree Source is not specified." - @echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'" - @echo >&2 "or build with 'DEVICE_TREE=<dts-file-name>' argument" - @/bin/false +$(DTB): arch-dtbs + $(Q)test -e $@ || ( \ + echo >&2; \ + echo >&2 "Device Tree Source is not correctly specified."; \ + echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'"; \ + echo >&2 "or build with 'DEVICE_TREE=<device_tree>' argument"; \ + echo >&2; \ + /bin/false) + +arch-dtbs: + $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs .SECONDARY: $(obj)/dt.dtb.S @@ -36,3 +42,6 @@ dtbs: $(obj)/dt.dtb @: clean-files := dt.dtb.S + +# Let clean descend into dts directories +subdir- += ../arch/*/dts |