Skip to contentSkip to conversation

update to earlier patch to support multiple device trees in /boot

PATCH New Gary Coulbourne 1 participant 2 messages Jan 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 update to earlier patch to support multiple device trees in /boot

I submitted a patch earlier for copying device files into /boot, this adds support for multiple device trees.

Gary Coulbourne (1):
modifications of original patch to copy device trees into the boot
directory. This now supports multiple device trees.

 linux/Config.in |    6 ++++++
 linux/linux.mk  |   10 ++++++++++
 2 files changed, 16 insertions(+)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 modifications of original patch to copy device trees into the boot directory. This now supports multiple device trees.

---
 linux/Config.in |    6 ++++++
 linux/linux.mk  |   10 ++++++++++
 2 files changed, 16 insertions(+)
linux/Config.in +6 -0
index 9ebe0c9..b48911e 100644
@@ -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_DTB_INSTALL_TARGET
+        bool "Install Device Trees to /boot in target"
+        depends on BR2_LINUX_KERNEL_DTS_SUPPORT
+	help
+	  Select this option to have the device trees installed to
+          /boot in the target root filesystem.
 
 # Linux extensions
 source "linux/Config.ext.in"
linux/linux.mk +10 -0
index e852f62..6c1c7a8 100644
@@ -214,6 +214,15 @@ define LINUX_APPEND_DTB
 endef
 endif
 
+ifeq ($(BR2_LINUX_DTB_INSTALL_TARGET),y)
+define LINUX_INSTALL_DTB_TO_TARGET
+	install -m 0644 -D $(addprefix \
+		$(KERNEL_ARCH_PATH)/boot/$(if $(wildcard \
+		$(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \
+		$(TARGET_DIR)/boot/
+endef
+endif
+
 # Compilation. We make sure the kernel gets rebuilt when the
 # configuration has changed.
 define LINUX_BUILD_CMDS
@@ -250,6 +259,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 	\
Signature · 1 line
1.7.10.4