All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Balean <james@balean.com.au>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2] Add out-of-source U-Boot device tree support
Date: Tue,  4 Apr 2017 22:45:51 -0500	[thread overview]
Message-ID: <1491363951-3971-1-git-send-email-james@balean.com.au> (raw)
In-Reply-To: <1491362990-3697-1-git-send-email-james@balean.com.au>

Similaly to Linux, this patch adds the ability to copy in and build
out-of-source device tree sources during a U-Boot build.

Signed-off-by: James Balean <james@balean.com.au>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Changes for v2:
  - Added dependency on U-Boot Kconfig build system.
  - Code style cleanup

 boot/uboot/Config.in | 14 ++++++++++++++
 boot/uboot/uboot.mk  |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index c33861b..ca94749 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -407,4 +407,18 @@ config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT
 
 endif # BR2_TARGET_UBOOT_ENVIMAGE
 
+if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
+
+config BR2_TARGET_UBOOT_CUSTOM_DTS_PATH
+	string "Device Tree Source file paths"
+	help
+	  Path to the device tree source files. You can provide a list
+	  of dts paths to copy, separated by spaces.
+
+	  To use this device tree source file, the U-Boot configuration
+	  file must refer to it.
+
+endif
+
 endif # BR2_TARGET_UBOOT
+
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index aac692c..1d464d9 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -195,6 +195,9 @@ endef
 endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY
 
 define UBOOT_BUILD_CMDS
+	$(if $(BR2_TARGET_UBOOT_CUSTOM_DTS_PATH),
+		cp -f $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_DTS_PATH)) $(@D)/arch/$(UBOOT_ARCH)/dts/
+	)
 	$(TARGET_CONFIGURE_OPTS) 	\
 		$(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) 		\
 		$(UBOOT_MAKE_TARGET)
-- 
2.7.4

  reply	other threads:[~2017-04-05  3:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-27  6:12 [Buildroot] [PATCH] Add out-of-source U-Boot device tree support James Balean
2017-03-27 12:12 ` Arnout Vandecappelle
2017-03-28  1:19   ` James Balean
2017-03-28  6:14   ` James Balean
2017-03-28  9:01     ` Arnout Vandecappelle
2017-03-28 19:53       ` Thomas Petazzoni
2017-03-28 20:19         ` Arnout Vandecappelle
2017-03-28 20:29           ` Thomas Petazzoni
2017-03-28 22:17             ` Arnout Vandecappelle
2017-03-29  7:09               ` Thomas Petazzoni
2017-04-05  3:29                 ` James Balean
2017-04-05  3:45                   ` James Balean [this message]
2017-04-05 20:30                     ` [Buildroot] [PATCH v2] " Thomas Petazzoni

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=1491363951-3971-1-git-send-email-james@balean.com.au \
    --to=james@balean.com.au \
    --cc=buildroot@busybox.net \
    /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.