[PATCHv2 3/5] image: support board_fit_config_name_match

Stefano Babic sbabic at denx.de
Mon Dec 28 12:39:57 CET 2020


On 15.12.20 00:41, Sebastian Reichel wrote:
> Support reusing board_fit_config_name_match() to automatically
> select a sensible default configuration for booting fitImages
> using 'bootm'.
> 

For reasons I have not understood, this patch breaks "sometimes" the build :

+common/image-fit.c: In function 'boot_get_fdt_fit':
+common/image-fit.c:2279:10: error: implicit declaration of function
'fdt_overlay_apply_verbose'; did you mean 'fdt_overlay_apply_node'?
[-Werror=implicit-function-declaration]
+ 2279 |    err = fdt_overlay_apply_verbose(base, ov);
+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
+      |          fdt_overlay_apply_node
+cc1: all warnings being treated as errors

https://gitlab.denx.de/u-boot/custodians/u-boot-imx/-/jobs/193967

And it looks to me that fdt_support.h is included.

This happens if I run buildman locally, too. But it is not
deterministic, sometimes it succeed.

snapper9g20 and snapper9260 seem to trigger more frequently the issues
(but they are not the ones). So I applied the patches related to the
board, but I left this out.

Best regards,
Stefano Babic

> Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
> ---
>  common/image-fit.c | 19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/common/image-fit.c b/common/image-fit.c
> index 1f382d87e207..b3aeff8c5e4a 100644
> --- a/common/image-fit.c
> +++ b/common/image-fit.c
> @@ -1738,12 +1738,19 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
>  	if (conf_uname == NULL) {
>  		/* get configuration unit name from the default property */
>  		debug("No configuration specified, trying default...\n");
> -		conf_uname = (char *)fdt_getprop(fit, confs_noffset,
> -						 FIT_DEFAULT_PROP, &len);
> -		if (conf_uname == NULL) {
> -			fit_get_debug(fit, confs_noffset, FIT_DEFAULT_PROP,
> -				      len);
> -			return len;
> +		if (!host_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
> +			noffset = fit_find_config_node(fit);
> +			if (noffset < 0)
> +				return noffset;
> +			conf_uname = fdt_get_name(fit, noffset, NULL);
> +		} else {
> +			conf_uname = (char *)fdt_getprop(fit, confs_noffset,
> +							 FIT_DEFAULT_PROP, &len);
> +			if (conf_uname == NULL) {
> +				fit_get_debug(fit, confs_noffset, FIT_DEFAULT_PROP,
> +					      len);
> +				return len;
> +			}
>  		}
>  		debug("Found default configuration: '%s'\n", conf_uname);
>  	}
> 


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list