Skip to content

Commit

Permalink
Ensure device tree DTS is compiled
Browse files Browse the repository at this point in the history
Enables custom DTS files, or those not associated with a specific target, to be compiled into a boot image.

Signed-off-by: James Balean <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Simon Glass <[email protected]>
  • Loading branch information
slicen authored and sjg20 committed Mar 26, 2017
1 parent 5cf618e commit 27cb730
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,25 @@ 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
$(call if_changed,shipped)

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."; \
Expand All @@ -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

Expand Down

0 comments on commit 27cb730

Please sign in to comment.