[PATCH v1] [v1] scripts/Makefile.lib: increase detail for dtsi debug output

E Shattow e at freeshell.de
Mon Sep 1 05:40:20 CEST 2025


On 8/27/25 23:51, E Shattow wrote:
> Detailed dtsi automatic selection debug output when DEVICE_TREE_DEBUG=1
>   - Indicate when key is undefined and skip undefined search pattern
>   - Indicate when search pattern is found or not found, and the pattern
>   - Show values of defined keys
> 
> Signed-off-by: E Shattow <e at freeshell.de>
> ---
>  scripts/Makefile.lib | 29 ++++++++++++++++++++++++++---
>  1 file changed, 26 insertions(+), 3 deletions(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 5db2fbc418a..3cbb20e6b9d 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -203,13 +203,36 @@ u_boot_dtsi_options = $(strip $(wildcard $(u_boot_dtsi_loc)$(basename $(notdir $
>  	$(wildcard $(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
>  	$(wildcard $(u_boot_dtsi_loc)u-boot.dtsi))
>  
> -u_boot_dtsi_options_raw = $(warning Automatic .dtsi inclusion: options: \
> +u_boot_dtsi_options_raw = $(warning Automatic inclusion \
> +	$(or $(u_boot_dtsi_options),(undefined)) from search order: \
> +	$$<=$(if \
> +	$(<),$(<) $(if $(wildcard \
>  	$(u_boot_dtsi_loc)$(basename $(notdir $<))-u-boot.dtsi \
> +	),,not) found @ \
> +	$(u_boot_dtsi_loc)$(basename $(notdir $<))-u-boot.dtsi \
> +	,(undefined)) || \
> +	$$CONFIG_SYS_SOC=$(if \
> +	$(CONFIG_SYS_SOC),$(CONFIG_SYS_SOC) $(if $(wildcard \
> +	$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi \
> +	),,not) found @ \
>  	$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi \
> +	,(undefined)) || \
> +	$$CONFIG_SYS_CPU=$(if \
> +	$(CONFIG_SYS_CPU),$(CONFIG_SYS_CPU) $(if $(wildcard \
>  	$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi \
> +	),,not) found @ \
> +	$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi \
> +	,(undefined)) || \
> +	$$CONFIG_SYS_VENDOR=$(if \
> +	$(CONFIG_SYS_VENDOR),$(CONFIG_SYS_VENDOR) $(if $(wildcard \
> +	$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi \
> +	),,not) found @ \
>  	$(u_boot_dtsi_loc)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi \
> -	$(u_boot_dtsi_loc)u-boot.dtsi ... \
> -	found: $(if $(u_boot_dtsi_options),"$(u_boot_dtsi_options)",nothing!))
> +	,(undefined)) || \
> +	"u-boot.dtsi" $(if $(wildcard \
> +	$(u_boot_dtsi_loc)u-boot.dtsi \
> +	),,not) found @ \
> +	$(u_boot_dtsi_loc)u-boot.dtsi)
>  
>  # Uncomment for debugging
>  # This shows all the files that were considered and the one that we chose.
> 
> base-commit: 3dc5e9a0108bb114175b6362f9cb22367402f624

Postscript, this patch does what I want, but is worse to mantain.

I think I have something easier to understand with foreach(). Will send
soon.

-E


More information about the U-Boot mailing list