@@ -434,6 +434,25 @@ config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT
Choose this option to support Device Tree overlays
on the target system.
+if BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT
+
+config BR2_LINUX_KERNEL_INTREE_DTS_OVERLAY_NAME
+ string "In-tree Device Tree Overlay Source file names"
+ help
+ Name of in-tree device tree source file, without
+ the trailing .dts. You can provide a list of
+ dts overlay files to build, separated by spaces.
+
+config BR2_LINUX_KERNEL_CUSTOM_DTS_OVERLAY_PATH
+ string "Out-of-tree Device Tree Overlay Source file paths"
+ help
+ Paths to out-of-tree Device Tree Source (.dts) and Device Tree
+ Source Include (.dtsi) files, separated by spaces. These files
+ will be copied to the kernel sources and the .dts files will
+ be compiled from there to dtb overlays (.dtbo).
+
+endif
+
endif
config BR2_LINUX_KERNEL_INSTALL_TARGET
@@ -198,6 +198,11 @@ LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_K
LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME))
+LINUX_DTS_OVERLAY_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_OVERLAY_NAME))
+LINUX_DTS_OVERLAY_NAME += $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_OVERLAY_PATH)))))
+
+LINUX_DTBS += $(addsuffix .dtbo,$(LINUX_DTS_OVERLAY_NAME))
+
ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
LINUX_IMAGE_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_NAME))
LINUX_TARGET_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME))
Some kernels have device tree overlay files: make arch/arm64/boot/dts/amlogic/overlays/odroidn2/i2c0.dtbo Add an option to add these dtbo files to the LINUX_DTBS list. BR2_LINUX_KERNEL_INTREE_DTS_OVERLAY_NAME="amlogic/overlays/odroidn2/i2c0" Signed-off-by: Christian Stewart <christian@aperture.us> --- linux/Config.in | 19 +++++++++++++++++++ linux/linux.mk | 5 +++++ 2 files changed, 24 insertions(+)