Commit 27cb7300 authored by James Balean's avatar James Balean Committed by Simon Glass

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: default avatarJames Balean <james@balean.com.au>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Simon Glass <sjg@chromium.org>
parent 5cf618ee
...@@ -12,10 +12,14 @@ ifeq ($(DEVICE_TREE),) ...@@ -12,10 +12,14 @@ ifeq ($(DEVICE_TREE),)
DEVICE_TREE := unset DEVICE_TREE := unset
endif endif
ARCH_PATH := arch/$(ARCH)/dts
dtb_depends := arch-dtbs
ifneq ($(EXT_DTB),) ifneq ($(EXT_DTB),)
DTB := $(EXT_DTB) DTB := $(EXT_DTB)
else else
DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb DTB := $(ARCH_PATH)/$(DEVICE_TREE).dtb
dtb_depends += $(DTB:.dtb=.dts)
endif endif
$(obj)/dt.dtb: $(DTB) FORCE $(obj)/dt.dtb: $(DTB) FORCE
...@@ -23,7 +27,10 @@ $(obj)/dt.dtb: $(DTB) FORCE ...@@ -23,7 +27,10 @@ $(obj)/dt.dtb: $(DTB) FORCE
targets += dt.dtb targets += dt.dtb
$(DTB): arch-dtbs $(DTB): $(dtb_depends)
ifeq ($(EXT_DTB),)
$(Q)$(MAKE) $(build)=$(ARCH_PATH) $@
endif
$(Q)test -e $@ || ( \ $(Q)test -e $@ || ( \
echo >&2; \ echo >&2; \
echo >&2 "Device Tree Source is not correctly specified."; \ echo >&2 "Device Tree Source is not correctly specified."; \
...@@ -33,7 +40,7 @@ $(DTB): arch-dtbs ...@@ -33,7 +40,7 @@ $(DTB): arch-dtbs
/bin/false) /bin/false)
arch-dtbs: arch-dtbs:
$(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs $(Q)$(MAKE) $(build)=$(ARCH_PATH) dtbs
.SECONDARY: $(obj)/dt.dtb.S .SECONDARY: $(obj)/dt.dtb.S
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment