Commit d8ab0fe5 authored by Sebastian Reichel's avatar Sebastian Reichel Committed by Tom Rini
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent f14e6eec
...@@ -1738,12 +1738,19 @@ int fit_conf_get_node(const void *fit, const char *conf_uname) ...@@ -1738,12 +1738,19 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
if (conf_uname == NULL) { if (conf_uname == NULL) {
/* get configuration unit name from the default property */ /* get configuration unit name from the default property */
debug("No configuration specified, trying default...\n"); debug("No configuration specified, trying default...\n");
conf_uname = (char *)fdt_getprop(fit, confs_noffset, if (!host_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
FIT_DEFAULT_PROP, &len); noffset = fit_find_config_node(fit);
if (conf_uname == NULL) { if (noffset < 0)
fit_get_debug(fit, confs_noffset, FIT_DEFAULT_PROP, return noffset;
len); conf_uname = fdt_get_name(fit, noffset, NULL);
return len; } 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); debug("Found default configuration: '%s'\n", conf_uname);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment