@@ -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"
@@ -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 \
Signed-off-by: Gary Coulbourne <bear@bears.org> --- linux/Config.in | 6 ++++++ linux/linux.mk | 10 ++++++++++ 2 files changed, 16 insertions(+)