[PATCH 1/3] image: support board_fit_config_name_match
Simon Glass
sjg at chromium.org
Sat Dec 12 16:39:45 CET 2020
Hi Sebastian,
On Tue, 8 Dec 2020 at 11:10, Sebastian Reichel
<sebastian.reichel at collabora.com> wrote:
>
> Support reusing board_fit_config_name_match() to automatically
> select a sensible default configuration for booting fitImages
> using 'bootm'.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
> ---
> common/image-fit.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/common/image-fit.c b/common/image-fit.c
> index c82d4d8015f0..52c194222735 100644
> --- a/common/image-fit.c
> +++ b/common/image-fit.c
> @@ -1741,6 +1741,12 @@ 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");
> +#if !defined(USE_HOSTCC) && defined(CONFIG_MULTI_DTB_FIT)
Is there a way to use 'if IS_ENABLED() 'instead? here Perhaps we need
a new host_build() function in a suitable header file that returns the
value of USE_HOSTCC?
> + 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) {
> @@ -1748,6 +1754,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
> len);
> return len;
> }
> +#endif
> debug("Found default configuration: '%s'\n", conf_uname);
> }
>
> --
> 2.29.2
>
Regards,
Simon
More information about the U-Boot
mailing list