diff --git a/linux/Config.in b/linux/Config.in index 30fc9f095f..d6a0ace6c0 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -426,12 +426,20 @@ config BR2_LINUX_KERNEL_INTREE_DTS_NAME the trailing .dts. You can provide a list of dts files to build, separated by spaces. +config BR2_LINUX_KERNEL_INTREE_DTSO_NAMES + string "In-tree Device Tree Overlay file names" + help + Names of in-tree device tree overlay, without the trailing + .dtso which should be built and installed into the target + system, separated by spaces. + config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH string "Out-of-tree Device Tree 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 + Paths to out-of-tree Device Tree Source (.dts), Device Tree + Source Include (.dtsi) and Device Tree Overlay Source (.dtso) + files, separated by spaces. These files will be copied to the + kernel sources and the .dts files will be compiled from there. config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME diff --git a/linux/linux.mk b/linux/linux.mk index 12699b8ee4..9c621c18d5 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -203,14 +203,17 @@ endif LINUX_VERSION_PROBED = `MAKEFLAGS='$(filter-out w,$(MAKEFLAGS))' $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease 2>/dev/null` LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) +LINUX_DTSO_NAMES += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTSO_NAMES)) # We keep only the .dts files, so that the user can specify both .dts # and .dtsi files in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH. Both will be # copied to arch//boot/dts, but only the .dts files will # actually be generated as .dtb. -LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))))) +LINUX_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) +LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(LINUX_CUSTOM_DTS_PATH)))) +LINUX_DTSO_NAMES += $(basename $(filter %.dtso,$(notdir $(LINUX_CUSTOM_DTS_PATH)))) -LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME)) +LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME)) $(addsuffix .dtbo,$(LINUX_DTSO_NAMES)) ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y) LINUX_IMAGE_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_NAME))