* [PATCH v2] scripts/Makefile.lib: add CONFIG_SYS_CONFIG_NAME prefix to dtsi search
@ 2025-08-26 21:47 E Shattow
2025-09-12 14:23 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: E Shattow @ 2025-08-26 21:47 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot, Rasmus Villemoes, E Shattow
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@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scripts/Makefile.lib: add CONFIG_SYS_CONFIG_NAME prefix to dtsi search
2025-08-26 21:47 [PATCH v2] scripts/Makefile.lib: add CONFIG_SYS_CONFIG_NAME prefix to dtsi search E Shattow
@ 2025-09-12 14:23 ` Tom Rini
2025-09-13 9:23 ` E Shattow
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2025-09-12 14:23 UTC (permalink / raw)
To: E Shattow; +Cc: u-boot, Rasmus Villemoes
[-- Attachment #1: Type: text/plain, Size: 946 bytes --]
On Tue, Aug 26, 2025 at 02:47:00PM -0700, E Shattow wrote:
> 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@freeshell.de>
> ---
> doc/develop/devicetree/control.rst | 1 +
> scripts/Makefile.lib | 2 ++
> 2 files changed, 3 insertions(+)
A problem is that today, this leads to failure to build on:
mt7622_rfb mt7986_rfb mt7986a_bpir3_emmc mt7986a_bpir3_sd mt7988_rfb
mt7988_sd_rfb mt8516_pum
pkin socfpga_stratix10 socfpga_stratix10_atf socfpga_agilex5
socfpga_agilex5_nand2 socfpga_agil
ex5_vab socfpga_n5x socfpga_n5x_atf socfpga_n5x_vab
mt7623a_unielec_u7623_02 mt7623n_bpir2 imx6
q_bosch_acc imx6dl_mamoj socfpga_arria10 socfpga_arria5 socfpga_cyclone5
Because the problem you're trying to solve is being partly solved in
another way by others, perhaps?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scripts/Makefile.lib: add CONFIG_SYS_CONFIG_NAME prefix to dtsi search
2025-09-12 14:23 ` Tom Rini
@ 2025-09-13 9:23 ` E Shattow
2025-09-14 2:43 ` E Shattow
0 siblings, 1 reply; 4+ messages in thread
From: E Shattow @ 2025-09-13 9:23 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot, Rasmus Villemoes
On 9/12/25 07:23, Tom Rini wrote:
> On Tue, Aug 26, 2025 at 02:47:00PM -0700, E Shattow wrote:
>
>> 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@freeshell.de>
>> ---
>> doc/develop/devicetree/control.rst | 1 +
>> scripts/Makefile.lib | 2 ++
>> 2 files changed, 3 insertions(+)
>
> A problem is that today, this leads to failure to build on:
> mt7622_rfb mt7986_rfb mt7986a_bpir3_emmc mt7986a_bpir3_sd mt7988_rfb
> mt7988_sd_rfb mt8516_pum
> pkin socfpga_stratix10 socfpga_stratix10_atf socfpga_agilex5
> socfpga_agilex5_nand2 socfpga_agil
> ex5_vab socfpga_n5x socfpga_n5x_atf socfpga_n5x_vab
> mt7623a_unielec_u7623_02 mt7623n_bpir2 imx6
> q_bosch_acc imx6dl_mamoj socfpga_arria10 socfpga_arria5 socfpga_cyclone5
>
> Because the problem you're trying to solve is being partly solved in
> another way by others, perhaps?
>
For example the first in the list of build failure, mt7622_rfb:
DTC arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dtb
Error: /root/source/u-boot.git/arch/arm/dts/mt7622-u-boot.dtsi:27.1-6
Label or path snfi not found
This happens because CONFIG_SYS_CONFIG_NAME is "mt7622" and is not the
expected "m7622-rfb". Explicitly setting CONFIG_SYS_CONFIG_NAME in
configs/mt7622_rfb_defconfig does not work.
arch/arm/mach-mediatek/Kconfig:
config SYS_CONFIG_NAME
default "mt7622" if TARGET_MT7622
default "mt7623" if TARGET_MT7623
default "mt7629" if TARGET_MT7629
default ...
Drop this in-flight change from the above and it compiles fine.
I would expect this to be an anti-pattern/bug unless we are setting
CONFIG_SYS_CONFIG_NAME explicitly in a config file, no?
Why is SYS_CONFIG_NAME being modified in this way?
-E
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] scripts/Makefile.lib: add CONFIG_SYS_CONFIG_NAME prefix to dtsi search
2025-09-13 9:23 ` E Shattow
@ 2025-09-14 2:43 ` E Shattow
0 siblings, 0 replies; 4+ messages in thread
From: E Shattow @ 2025-09-14 2:43 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot, Rasmus Villemoes
On 9/13/25 02:23, E Shattow wrote:
>
>
> On 9/12/25 07:23, Tom Rini wrote:
>> On Tue, Aug 26, 2025 at 02:47:00PM -0700, E Shattow wrote:
>>
>>> 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@freeshell.de>
>>> ---
>>> doc/develop/devicetree/control.rst | 1 +
>>> scripts/Makefile.lib | 2 ++
>>> 2 files changed, 3 insertions(+)
>>
>> A problem is that today, this leads to failure to build on:
>> mt7622_rfb mt7986_rfb mt7986a_bpir3_emmc mt7986a_bpir3_sd mt7988_rfb
>> mt7988_sd_rfb mt8516_pum
>> pkin socfpga_stratix10 socfpga_stratix10_atf socfpga_agilex5
>> socfpga_agilex5_nand2 socfpga_agil
>> ex5_vab socfpga_n5x socfpga_n5x_atf socfpga_n5x_vab
>> mt7623a_unielec_u7623_02 mt7623n_bpir2 imx6
>> q_bosch_acc imx6dl_mamoj socfpga_arria10 socfpga_arria5 socfpga_cyclone5
>>
>> Because the problem you're trying to solve is being partly solved in
>> another way by others, perhaps?
>>
>
> For example the first in the list of build failure, mt7622_rfb:
>
> DTC arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dtb
> Error: /root/source/u-boot.git/arch/arm/dts/mt7622-u-boot.dtsi:27.1-6
> Label or path snfi not found
>
> This happens because CONFIG_SYS_CONFIG_NAME is "mt7622" and is not the
> expected "m7622-rfb". Explicitly setting CONFIG_SYS_CONFIG_NAME in
> configs/mt7622_rfb_defconfig does not work.
>
> arch/arm/mach-mediatek/Kconfig:
> config SYS_CONFIG_NAME
> default "mt7622" if TARGET_MT7622
> default "mt7623" if TARGET_MT7623
> default "mt7629" if TARGET_MT7629
> default ...
>
> Drop this in-flight change from the above and it compiles fine.
>
> I would expect this to be an anti-pattern/bug unless we are setting
> CONFIG_SYS_CONFIG_NAME explicitly in a config file, no?
>
> Why is SYS_CONFIG_NAME being modified in this way?
>
> -E
Replying my own questions, the name of the defconfig is not represented
by SYS_CONFIG_NAME and NAK my own patch here... it will have to be a
different (new?) symbol name and configurable from Kconfig not
necessarily defconfig file name.
I'll improve on the other series "increase detail for dtsi debug output"
and propose a user-configurable dtsi include order that is more suitable.
Thanks for your patience while I learn these programming concepts!
-E
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-09-14 2:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26 21:47 [PATCH v2] scripts/Makefile.lib: add CONFIG_SYS_CONFIG_NAME prefix to dtsi search E Shattow
2025-09-12 14:23 ` Tom Rini
2025-09-13 9:23 ` E Shattow
2025-09-14 2:43 ` E Shattow
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.