@@ -394,6 +394,15 @@ config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
You can provide a list of dts paths to copy and
build, separated by spaces.
+config BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT
+ bool "Build Device Tree with overlay support"
+ default n
+ help
+ If enabled, pass the "-@" option to dtc, such that
+ symbols are generated in the compiled Device Tree.
+ Choose this option to support Device Tree overlays
+ on the target system.
+
endif
config BR2_LINUX_KERNEL_INSTALL_TARGET
@@ -381,6 +381,10 @@ ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
# reproducibility, we use our owns rather than the host ones.
LINUX_DEPENDENCIES += host-bison host-flex
+ifeq ($(BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT),y)
+LINUX_MAKE_ENV += DTC_FLAGS=-@
+endif
+
ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),)
define LINUX_BUILD_DTB
$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_DTBS)
Add an option to compile device trees in Linux with symbol generation such that device tree overlays can be loaded on the target system Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu> --- Changes v1->v2: * Make the option more specific about DT Overlays (rather than simply describing DT symbols generation) * Remove indentation in linux.mk to fit code style Changes V2->v3: * Fix formatting of the Config.in help section to fit code style --- linux/Config.in | 9 +++++++++ linux/linux.mk | 4 ++++ 2 files changed, 13 insertions(+)