Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Coulbourne <bear@bears.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] dtb: provide option to install dtb to boot directory
Date: Thu, 20 Dec 2012 17:22:27 -0500	[thread overview]
Message-ID: <1356042147-1532-1-git-send-email-bear@bears.org> (raw)


Signed-off-by: Gary Coulbourne <bear@bears.org>
---
 linux/Config.in |    6 ++++++
 linux/linux.mk  |    7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/linux/Config.in b/linux/Config.in
index 9ebe0c9..8918297 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -284,6 +284,12 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET
 	  /boot in the target root filesystem, as is typically done on
 	  x86/x86_64 systems.
 
+config BR2_LINUX_DEVICE_TREE_INSTALL_TARGET
+	bool "Install Device Tree to /boot in target"
+	depends on BR2_LINUX_KERNEL_DTS_SUPPORT
+	help
+	  Select this option to have the device tree installed to
+	  /boot in the target root filesystem.
 
 # Linux extensions
 source "linux/Config.ext.in"
diff --git a/linux/linux.mk b/linux/linux.mk
index 3321d80..6d8c752 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -211,6 +211,12 @@ define LINUX_APPEND_DTB
 endef
 endif
 
+ifeq ($(BR2_LINUX_DEVICE_TREE_INSTALL_TARGET),y)
+define LINUX_INSTALL_DTB_TO_TARGET
+	install -m 0644 -D $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(TARGET_DIR)/boot/$(KERNEL_DTS_NAME).dtb
+endef
+endif
+
 # Compilation. We make sure the kernel gets rebuilt when the
 # configuration has changed.
 define LINUX_BUILD_CMDS
@@ -247,6 +253,7 @@ endef
 define LINUX_INSTALL_TARGET_CMDS
 	$(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET)
 	$(LINUX_INSTALL_DTB)
+	$(LINUX_INSTALL_DTB_TO_TARGET)
 	# Install modules and remove symbolic links pointing to build
 	# directories, not relevant on the target
 	@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then 	\
-- 
1.7.10.4

             reply	other threads:[~2012-12-20 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20 22:22 Gary Coulbourne [this message]
2012-12-21  8:21 ` [Buildroot] [PATCH] dtb: provide option to install dtb to boot directory Peter Korsgaard
2013-08-01 16:09 ` 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=1356042147-1532-1-git-send-email-bear@bears.org \
    --to=bear@bears.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox