image: support board_fit_config_name_match
Support reusing board_fit_config_name_match() to automatically select a sensible default configuration for booting fitImages using 'bootm'. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
f14e6eec6c
commit
d8ab0fe5b5
@ -1738,6 +1738,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 (!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) {
|
||||
@ -1745,6 +1751,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
|
||||
len);
|
||||
return len;
|
||||
}
|
||||
}
|
||||
debug("Found default configuration: '%s'\n", conf_uname);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user