On Mon, Aug 24, 2026 at 10:12:55AM +0530, Suraj Kakade wrote:

> upstream_dtsi_include uses $(if (CONFIG_ARM64), ...), where
> "(CONFIG_ARM64)" is a literal string rather than a variable
> reference. Make evaluates it as the condition, which is always
> non-empty, so the arm64 upstream dtsi include directories are added
> unconditionally regardless of the target architecture.
> 
> Use $(CONFIG_ARM64) so the condition correctly evaluates the Kconfig
> symbol, gating the arm64 include directories on the actual target
> configuration.
> 
> Fixes: 3a4e5944c96c ("Makefile: Allow upstream DT subtree to provide DT 
> includes")
> Signed-off-by: Suraj Kakade <[email protected]>
> ---
>  scripts/Makefile.lib | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 122c8e78204..24b1a581790 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -251,7 +251,7 @@ dtsi_include_list = $(strip $(u_boot_dtsi_options_debug) \
>  upstream_dtsi_include = $(addprefix -I, $(srctree)/dts/upstream/src/ \
>       $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/$(ARCH)/*/*))) \
>       $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/$(ARCH)/*/*/*))) \
> -     $(if (CONFIG_ARM64), \
> +     $(if $(CONFIG_ARM64), \
>                $(sort $(dir $(wildcard 
> $(srctree)/dts/upstream/src/arm64/*/*))) \
>                $(sort $(dir $(wildcard 
> $(srctree)/dts/upstream/src/arm64/*/*/*)))))
>  dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \

While the diagnosis makes sense, the fix is wrong. The use case that
needs to work is we have 32bit ARM platforms that require files found
under dts/upstream/src/arm64 because they are common to 32bit platforms.
The whole list of failing platforms is:
j721e_beagleboneai64_r5 am62x_beagleplay_r5 am67a_beagley_ai_r5
phycore_am62ax_r5 phycore_am62ax_r5_ethboot phycore_am62ax_r5_usbdfu
phycore_am62x_r5 phycore_am62x_r5_ethboot phycore_am62x_r5_usbdfu
phycore_am64x_r5 phycore_am68x_r5 am62ax_evm_r5 am62ax_evm_r5_ethboot
am62dx_evm_r5 am62px_evm_r5 am62px_evm_r5_ethboot am6254atl_evm_r5
am62x_evm_r5 am62x_evm_r5_ethboot am62x_lpsk_r5 am64x_evm_r5
am65x_evm_r5 am65x_evm_r5_usbdfu am65x_evm_r5_usbmsc j7200_evm_r5
j721e_evm_r5 j721e_sk_r5 am68_sk_r5 am68_sk_r5_ethboot j721s2_evm_r5
j722s_evm_r5 j722s_evm_r5_ethboot am69_sk_r5 am69_sk_r5_ethboot
j742s2_evm_r5 j784s4_evm_r5 aquila-am69_r5 verdin-am62_r5
verdin-am62p_r5 mt7623a_unielec_u7623_02 mt7623n_bpir2 socfpga_is1
socfpga_sr1500 socfpga_arria10 socfpga_arria5 socfpga_cyclone5
socfpga_mcvevk socfpga_ac501soc socfpga_ac550soc socfpga_dbm_soc1
socfpga_socrates socfpga_chameleonv3 socfpga_secu1 socfpga_vining_fpga
socfpga_de0_nano_soc socfpga_de1_soc socfpga_de10_nano
socfpga_de10_standard socfpga_sockit

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to