All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Balean <james@balean.com.au>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Ensure device tree DTS is compiled
Date: Tue, 14 Mar 2017 00:38:13 -0500	[thread overview]
Message-ID: <1489469893-23319-1-git-send-email-james@balean.com.au> (raw)

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>
---
 dts/Makefile | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/dts/Makefile b/dts/Makefile
index c4ac153..6dfaf57 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)/dts/$(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)/dts dtbs
 
 .SECONDARY: $(obj)/dt.dtb.S
 
-- 
2.7.4

             reply	other threads:[~2017-03-14  5:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14  5:38 James Balean [this message]
2017-03-14 16:41 ` [U-Boot] [PATCH] Ensure device tree DTS is compiled Andy Shevchenko
2017-03-15 12:12   ` James
2017-03-16  4:11     ` [U-Boot] [PATCH v2] " James Balean
2017-03-27  2:27       ` Simon Glass
2017-04-26  1:02         ` Masahiro Yamada
2017-05-20  2:29           ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489469893-23319-1-git-send-email-james@balean.com.au \
    --to=james@balean.com.au \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.