summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/Kconfig10
-rw-r--r--boot/bootdev-uclass.c2
-rw-r--r--boot/bootm.c17
-rw-r--r--boot/bootm_os.c2
4 files changed, 19 insertions, 12 deletions
diff --git a/boot/Kconfig b/boot/Kconfig
index e6927d60b7b..8e468c56176 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -686,9 +686,9 @@ config BOOTMETH_QFW
depends on QFW
default y
help
- Use QEMU parameters -kernel, -initrd, -append to determine the kernel,
- initial RAM disk, and kernel command line parameters to boot an
- operating system. U-Boot's control device-tree is passed to the kernel.
+ Use QEMU parameters -kernel, -initrd, -append to determine the kernel,
+ initial RAM disk, and kernel command line parameters to boot an
+ operating system. U-Boot's control device-tree is passed to the kernel.
config BOOTMETH_VBE
bool "Bootdev support for Verified Boot for Embedded"
@@ -1084,7 +1084,7 @@ config MEASURED_BOOT
to use some attestation tools on your system.
if MEASURED_BOOT
- config MEASURE_DEVICETREE
+config MEASURE_DEVICETREE
bool "Measure the devicetree image"
default y if MEASURED_BOOT
help
@@ -1093,7 +1093,7 @@ if MEASURED_BOOT
Therefore, it should not be measured into the TPM. In that case,
disable the measurement here.
- config MEASURE_IGNORE_LOG
+config MEASURE_IGNORE_LOG
bool "Ignore the existing event log"
help
On platforms that use an event log memory region that persists
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 657804949f8..55e1a6c4e02 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -669,8 +669,6 @@ int bootdev_next_prio(struct bootflow_iter *iter, struct udevice **devp)
BOOTFLOWIF_SHOW);
log_debug("- bootdev_hunt_prio() ret %d\n",
ret);
- if (ret)
- return log_msg_ret("hun", ret);
}
} else {
ret = device_probe(dev);
diff --git a/boot/bootm.c b/boot/bootm.c
index 4c260a5f5ce..803d6406be4 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -330,6 +330,10 @@ static int bootm_find_os(const char *cmd_name, const char *addr_fit)
images.os.type = image_get_type(os_hdr);
images.os.comp = image_get_comp(os_hdr);
images.os.os = image_get_os(os_hdr);
+ if (images.os.os >= IH_OS_COUNT) {
+ printf("Unsupported OS type %d\n", images.os.os);
+ return 1;
+ }
images.os.end = image_get_image_end(os_hdr);
images.os.load = image_get_load(os_hdr);
@@ -371,11 +375,17 @@ static int bootm_find_os(const char *cmd_name, const char *addr_fit)
images.os.end = fit_get_end(images.fit_hdr_os);
if (fit_image_get_load(images.fit_hdr_os, images.fit_noffset_os,
- &images.os.load)) {
+ &images.os.load) &&
+ images.os.type != IH_TYPE_KERNEL_NOLOAD) {
puts("Can't get image load address!\n");
bootstage_error(BOOTSTAGE_ID_FIT_LOADADDR);
return 1;
}
+ if (images.os.load && images.os.type == IH_TYPE_KERNEL_NOLOAD) {
+ puts("WARNING: load address set for kernel_noload image, ignoring\n");
+ images.os.load = 0;
+ }
+
break;
#endif
#ifdef CONFIG_ANDROID_BOOT_IMAGE
@@ -423,7 +433,7 @@ static int bootm_find_os(const char *cmd_name, const char *addr_fit)
ret = fit_image_get_entry(images.fit_hdr_os,
images.fit_noffset_os, &images.ep);
- if (ret) {
+ if (ret && images.os.type != IH_TYPE_KERNEL_NOLOAD) {
puts("Can't get entry point property!\n");
return 1;
}
@@ -618,7 +628,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress)
ulong image_start = os.image_start;
ulong image_len = os.image_len;
ulong decomp_len = CONFIG_SYS_BOOTM_LEN;
- ulong flush_start = ALIGN_DOWN(load, ARCH_DMA_MINALIGN);
+ ulong flush_start;
bool no_overlap;
void *load_buf, *image_buf;
int err;
@@ -663,6 +673,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress)
/* We need the decompressed image size in the next steps */
images->os.image_len = load_end - load;
+ flush_start = ALIGN_DOWN(load, ARCH_DMA_MINALIGN);
flush_cache(flush_start, ALIGN(load_end, ARCH_DMA_MINALIGN) - flush_start);
debug(" kernel loaded at 0x%08lx, end = 0x%08lx\n", load, load_end);
diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index 69aa577a2fc..ae20b555f5c 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -599,7 +599,5 @@ int boot_selected_os(int state, struct bootm_info *bmi, boot_os_fn *boot_fn)
boot_os_fn *bootm_os_get_boot_func(int os)
{
- if (os < 0 || os >= ARRAY_SIZE(boot_os))
- return NULL;
return boot_os[os];
}