summaryrefslogtreecommitdiff
path: root/dts
diff options
context:
space:
mode:
authorJames Balean <james@balean.com.au>2017-03-16 04:11:31 (GMT)
committerSimon Glass <sjg@chromium.org>2017-03-26 19:22:58 (GMT)
commit27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67 (patch)
tree7d740c832492a6683d16a5b498ede7fa95d43899 /dts
parent5cf618ee60a752d058a767372ca1ecb8d9c09b16 (diff)
downloadu-boot-fsl-qoriq-27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67.tar.xz
Ensure device tree DTS is compiled
Enables custom DTS files, or those not associated with a specific target, to be compiled into a boot image. Signed-off-by: James Balean <james@balean.com.au> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'dts')
-rw-r--r--dts/Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/dts/Makefile b/dts/Makefile
index c4ac153..3a93daf 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -12,10 +12,14 @@ ifeq ($(DEVICE_TREE),)
DEVICE_TREE := unset
endif
+ARCH_PATH := arch/$(ARCH)/dts
+dtb_depends := arch-dtbs
+
ifneq ($(EXT_DTB),)
DTB := $(EXT_DTB)
else
-DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
+DTB := $(ARCH_PATH)/$(DEVICE_TREE).dtb
+dtb_depends += $(DTB:.dtb=.dts)
endif
$(obj)/dt.dtb: $(DTB) FORCE
@@ -23,7 +27,10 @@ $(obj)/dt.dtb: $(DTB) FORCE
targets += dt.dtb
-$(DTB): arch-dtbs
+$(DTB): $(dtb_depends)
+ifeq ($(EXT_DTB),)
+ $(Q)$(MAKE) $(build)=$(ARCH_PATH) $@
+endif
$(Q)test -e $@ || ( \
echo >&2; \
echo >&2 "Device Tree Source is not correctly specified."; \
@@ -33,7 +40,7 @@ $(DTB): arch-dtbs
/bin/false)
arch-dtbs:
- $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs
+ $(Q)$(MAKE) $(build)=$(ARCH_PATH) dtbs
.SECONDARY: $(obj)/dt.dtb.S