Revert "Merge patch series "vbe: Series part E""
This reverts commit 1fdf53ace13f745fe8ad4d2d4e79eed98088d555, reversing
changes made to e5aef1bbf11412eebd4c242b46adff5301353c30.
I had missed that this caused too much size growth on rcar3_salvator-x.
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/boot/image-fit.c b/boot/image-fit.c
index db7fb61..7d56f0b 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -1729,13 +1729,13 @@
images_noffset = fdt_path_offset(fit, FIT_IMAGES_PATH);
if (confs_noffset < 0 || images_noffset < 0) {
debug("Can't find configurations or images nodes.\n");
- return -EINVAL;
+ return -1;
}
fdt_compat = fdt_getprop(fdt, 0, "compatible", &fdt_compat_len);
if (!fdt_compat) {
debug("Fdt for comparison has no \"compatible\" property.\n");
- return -ENXIO;
+ return -1;
}
/*
@@ -1812,7 +1812,7 @@
}
if (!best_match_offset) {
debug("No match found.\n");
- return -ENOENT;
+ return -1;
}
return best_match_offset;
@@ -2095,18 +2095,17 @@
* fit_conf_get_node() will try to find default config node
*/
bootstage_mark(bootstage_id + BOOTSTAGE_SUB_NO_UNIT_NAME);
- ret = -ENXIO;
- if (IS_ENABLED(CONFIG_FIT_BEST_MATCH) && !fit_uname_config)
- ret = fit_conf_find_compat(fit, gd_fdt_blob());
- if (ret < 0 && ret != -EINVAL)
- ret = fit_conf_get_node(fit, fit_uname_config);
- if (ret < 0) {
+ if (IS_ENABLED(CONFIG_FIT_BEST_MATCH) && !fit_uname_config) {
+ cfg_noffset = fit_conf_find_compat(fit, gd_fdt_blob());
+ } else {
+ cfg_noffset = fit_conf_get_node(fit, fit_uname_config);
+ }
+ if (cfg_noffset < 0) {
puts("Could not find configuration node\n");
bootstage_error(bootstage_id +
BOOTSTAGE_SUB_NO_UNIT_NAME);
return -ENOENT;
}
- cfg_noffset = ret;
fit_base_uname_config = fdt_get_name(fit, cfg_noffset, NULL);
printf(" Using '%s' configuration\n", fit_base_uname_config);
@@ -2226,7 +2225,6 @@
data = map_to_sysmem(buf);
load = data;
if (load_op == FIT_LOAD_IGNORED) {
- log_debug("load_op: not loading\n");
/* Don't load */
} else if (fit_image_get_load(fit, noffset, &load)) {
if (load_op == FIT_LOAD_REQUIRED) {
@@ -2263,13 +2261,10 @@
/* Kernel images get decompressed later in bootm_load_os(). */
if (!fit_image_get_comp(fit, noffset, &comp) &&
comp != IH_COMP_NONE &&
- load_op != FIT_LOAD_IGNORED &&
!(image_type == IH_TYPE_KERNEL ||
image_type == IH_TYPE_KERNEL_NOLOAD ||
image_type == IH_TYPE_RAMDISK)) {
ulong max_decomp_len = len * 20;
-
- log_debug("decompressing image\n");
if (load == data) {
loadbuf = malloc(max_decomp_len);
load = map_to_sysmem(loadbuf);
@@ -2284,7 +2279,6 @@
}
len = load_end - load;
} else if (load != data) {
- log_debug("copying\n");
loadbuf = map_sysmem(load, len);
memcpy(loadbuf, buf, len);
}
@@ -2294,9 +2288,8 @@
" please fix your .its file!\n");
/* verify that image data is a proper FDT blob */
- if (load_op != FIT_LOAD_IGNORED && image_type == IH_TYPE_FLATDT &&
- fdt_check_header(loadbuf)) {
- puts("Subimage data is not a FDT\n");
+ if (image_type == IH_TYPE_FLATDT && fdt_check_header(loadbuf)) {
+ puts("Subimage data is not a FDT");
return -ENOEXEC;
}