summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-12-12 21:07:26 -0600
committerTom Rini <[email protected]>2024-12-12 21:07:26 -0600
commita33185173dce550d6ecb96b7fa625bb5e2183d66 (patch)
treeadd17fdeadcdddc9eb7922c7c09486027812df40 /boot
parent1fdf53ace13f745fe8ad4d2d4e79eed98088d555 (diff)
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 <[email protected]>
Diffstat (limited to 'boot')
-rw-r--r--boot/Kconfig71
-rw-r--r--boot/bootdev-uclass.c10
-rw-r--r--boot/image-fit.c29
3 files changed, 14 insertions, 96 deletions
diff --git a/boot/Kconfig b/boot/Kconfig
index 20935a269c6..99dcedcc840 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -163,18 +163,6 @@ config SPL_FIT
select SPL_HASH
select SPL_OF_LIBFDT
-config VPL_FIT
- bool "Support Flattened Image Tree within VPL"
- depends on VPL
- select VPL_HASH
- select VPL_OF_LIBFDT
-
-config TPL_FIT
- bool "Support Flattened Image Tree within TPL"
- depends on TPL
- select TPL_HASH
- select TPL_OF_LIBFDT
-
config SPL_FIT_PRINT
bool "Support FIT printing within SPL"
depends on SPL_FIT
@@ -280,28 +268,6 @@ config SPL_LOAD_FIT_FULL
particular it can handle selecting from multiple device tree
and passing the correct one to U-Boot.
-config TPL_LOAD_FIT
- bool "Enable TPL loading U-Boot as a FIT (basic fitImage features)"
- depends on TPL
- select TPL_FIT
- help
- Normally with the SPL framework a legacy image is generated as part
- of the build. This contains U-Boot along with information as to
- where it should be loaded. This option instead enables generation
- of a FIT (Flat Image Tree) which provides more flexibility. In
- particular it can handle selecting from multiple device tree
- and passing the correct one to U-Boot.
-
- This path has the following limitations:
-
- 1. "loadables" images, other than FDTs, which do not have a "load"
- property will not be loaded. This limitation also applies to FPGA
- images with the correct "compatible" string.
- 2. For FPGA images, the supported "compatible" list is in the
- doc/uImage.FIT/source_file_format.txt.
- 3. FDTs are only loaded for images with an "os" property of "u-boot".
- "linux" images are also supported with Falcon boot mode.
-
config SPL_FIT_IMAGE_POST_PROCESS
bool "Enable post-processing of FIT artifacts after loading by the SPL"
depends on SPL_LOAD_FIT
@@ -326,22 +292,6 @@ config VPL_FIT
select VPL_HASH
select VPL_OF_LIBFDT
-config VPL_LOAD_FIT
- bool "Enable VPL loading U-Boot as a FIT (basic fitImage features)"
- select VPL_FIT
- default y
-
-config VPL_LOAD_FIT_FULL
- bool "Enable SPL loading U-Boot as a FIT (full fitImage features)"
- select VPL_FIT
- help
- Normally with the SPL framework a legacy image is generated as part
- of the build. This contains U-Boot along with information as to
- where it should be loaded. This option instead enables generation
- of a FIT (Flat Image Tree) which provides more flexibility. In
- particular it can handle selecting from multiple device tree
- and passing the correct one to U-Boot.
-
config VPL_FIT_PRINT
bool "Support FIT printing within VPL"
depends on VPL_FIT
@@ -670,15 +620,6 @@ config VPL_BOOTMETH_VBE
supports selection of various firmware components, selection of an OS to
boot as well as updating these using fwupd.
-config TPL_BOOTMETH_VBE
- bool "Bootdev support for Verified Boot for Embedded (TPL)"
- depends on TPL
- default y
- help
- Enables support for VBE boot. This is a standard boot method which
- supports selection of various firmware components, seleciton of an OS to
- boot as well as updating these using fwupd.
-
if BOOTMETH_VBE
config BOOTMETH_VBE_REQUEST
@@ -704,8 +645,6 @@ config SPL_BOOTMETH_VBE_REQUEST
config BOOTMETH_VBE_SIMPLE
bool "Bootdev support for VBE 'simple' method"
default y
- imply SPL_CRC8 if SPL
- imply VPL_CRC8 if VPL
help
Enables support for VBE 'simple' boot. This allows updating a single
firmware image in boot media such as MMC. It does not support any sort
@@ -759,15 +698,7 @@ config VPL_BOOTMETH_VBE_SIMPLE_FW
This option enabled for VPL, since it is the phase where the SPL
decision is made.
-config TPL_BOOTMETH_VBE_SIMPLE_FW
- bool "Bootdev support for VBE 'simple' method firmware phase (TPL)"
- depends on VPL
- default y
- help
- Enables support for the firmware parts of VBE 'simple' boot, in TPL.
- TPL loads a FIT containing the VPL binary and a suitable devicetree.
-
-endif # BOOTMETH_VBE_SIMPLE
+endif # BOOTMETH_VBE
config EXPO
bool "Support for expos - groups of scenes displaying a UI"
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 2e61c853142..64ec4fde493 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -16,7 +16,6 @@
#include <malloc.h>
#include <part.h>
#include <sort.h>
-#include <spl.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/uclass-internal.h>
@@ -279,13 +278,8 @@ int bootdev_setup_for_sibling_blk(struct udevice *blk, const char *drv_name)
int ret, len;
len = bootdev_get_suffix_start(blk, ".blk");
- if (xpl_phase() < PHASE_BOARD_R) {
- strlcpy(dev_name, blk->name, sizeof(dev_name) - 5);
- strcat(dev_name, ".sib");
- } else {
- snprintf(dev_name, sizeof(dev_name), "%.*s.%s", len, blk->name,
- "bootdev");
- }
+ snprintf(dev_name, sizeof(dev_name), "%.*s.%s", len, blk->name,
+ "bootdev");
parent = dev_get_parent(blk);
ret = device_find_child_by_name(parent, dev_name, &dev);
diff --git a/boot/image-fit.c b/boot/image-fit.c
index db7fb61bca9..7d56f0b5e6e 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -1729,13 +1729,13 @@ int fit_conf_find_compat(const void *fit, const void *fdt)
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 @@ int fit_conf_find_compat(const void *fit, const void *fdt)
}
if (!best_match_offset) {
debug("No match found.\n");
- return -ENOENT;
+ return -1;
}
return best_match_offset;
@@ -2095,18 +2095,17 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
* 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 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
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 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
/* 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 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
}
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 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
" 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;
}