[PATCH v2] scripts/Makefile.lib: add CONFIG_SYS_CONFIG_NAME prefix to dtsi search
E Shattow
e at freeshell.de
Tue Aug 26 23:47:00 CEST 2025
Add ${CONFIG_SYS_CONFIG_NAME}-u-boot.dtsi into dtsi include search order:
orig filename, (SYS_CONFIG_NAME), SYS_SOC, SYS_CPU, SYS_VENDOR, no prefix
Signed-off-by: E Shattow <e at freeshell.de>
---
doc/develop/devicetree/control.rst | 1 +
scripts/Makefile.lib | 2 ++
2 files changed, 3 insertions(+)
diff --git a/doc/develop/devicetree/control.rst b/doc/develop/devicetree/control.rst
index 0233945f8b6..d946b432bf3 100644
--- a/doc/develop/devicetree/control.rst
+++ b/doc/develop/devicetree/control.rst
@@ -207,6 +207,7 @@ devicetree for your board, searching for them in `arch/<arch>/dts/` in this
order::
<orig_filename>-u-boot.dtsi
+ <CONFIG_SYS_CONFIG_NAME>-u-boot.dtsi
<CONFIG_SYS_SOC>-u-boot.dtsi
<CONFIG_SYS_CPU>-u-boot.dtsi
<CONFIG_SYS_VENDOR>-u-boot.dtsi
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 5db2fbc418a..5e7bd54a569 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -198,6 +198,7 @@ ld_flags = $(KBUILD_LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F))
u_boot_dtsi_loc = $(srctree)/arch/$(ARCH)/dts/
u_boot_dtsi_options = $(strip $(wildcard $(u_boot_dtsi_loc)$(basename $(notdir $<))-u-boot.dtsi) \
+ $(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CONFIG_NAME))-u-boot.dtsi) \
$(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
$(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
$(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
@@ -205,6 +206,7 @@ u_boot_dtsi_options = $(strip $(wildcard $(u_boot_dtsi_loc)$(basename $(notdir $
u_boot_dtsi_options_raw = $(warning Automatic .dtsi inclusion: options: \
$(u_boot_dtsi_loc)$(basename $(notdir $<))-u-boot.dtsi \
+ $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CONFIG_NAME))-u-boot.dtsi \
$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi \
$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi \
$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi \
base-commit: 3dc5e9a0108bb114175b6362f9cb22367402f624
--
2.50.0
More information about the U-Boot
mailing list