diff options
Diffstat (limited to 'boot')
-rw-r--r-- | boot/Kconfig | 9 | ||||
-rw-r--r-- | boot/Makefile | 2 | ||||
-rw-r--r-- | boot/bootm.c | 3 | ||||
-rw-r--r-- | boot/bootm_os.c | 10 | ||||
-rw-r--r-- | boot/bootmeth_android.c | 6 | ||||
-rw-r--r-- | boot/bootretry.c | 2 | ||||
-rw-r--r-- | boot/image-fit-sig.c | 10 |
7 files changed, 33 insertions, 9 deletions
diff --git a/boot/Kconfig b/boot/Kconfig index f101200ba7a..2456856a572 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1170,7 +1170,7 @@ config BOOTSTAGE_REPORT config BOOTSTAGE_RECORD_COUNT int "Number of boot stage records to store" depends on BOOTSTAGE - default 30 + default 50 help This is the size of the bootstage record list and is the maximum number of bootstage records that can be recorded. @@ -1704,6 +1704,13 @@ config RESET_TO_RETRY After the countdown timed out, the board will be reset to restart again. +config RETRY_BOOTCMD + bool "Run bootcmd on retry" + depends on BOOT_RETRY && HUSH_PARSER && !RESET_TO_RETRY + help + If this option is enabled, the "bootcmd" will be run after the + countdown times out. + endmenu menu "Image support" diff --git a/boot/Makefile b/boot/Makefile index 34bac26c4e2..71dafaefa76 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -47,7 +47,7 @@ obj-$(CONFIG_$(PHASE_)UPL_WRITE) += upl_write.o obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += image-fdt.o obj-$(CONFIG_$(PHASE_)FIT_SIGNATURE) += fdt_region.o obj-$(CONFIG_$(PHASE_)FIT) += image-fit.o -obj-$(CONFIG_$(XPL_)MULTI_DTB_FIT) += boot_fit.o common_fit.o +obj-$(CONFIG_$(PHASE_)MULTI_DTB_FIT) += boot_fit.o common_fit.o obj-$(CONFIG_$(PHASE_)IMAGE_PRE_LOAD) += image-pre-load.o obj-$(CONFIG_$(PHASE_)IMAGE_SIGN_INFO) += image-sig.o obj-$(CONFIG_$(PHASE_)FIT_SIGNATURE) += image-fit-sig.o diff --git a/boot/bootm.c b/boot/bootm.c index 854ac7ec738..f5cbb10f0d1 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -545,7 +545,8 @@ static int bootm_find_other(ulong img_addr, const char *conf_ramdisk, images.os.type == IH_TYPE_KERNEL_NOLOAD || images.os.type == IH_TYPE_MULTI) && (images.os.os == IH_OS_LINUX || images.os.os == IH_OS_VXWORKS || - images.os.os == IH_OS_EFI || images.os.os == IH_OS_TEE)) { + images.os.os == IH_OS_EFI || images.os.os == IH_OS_TEE || + images.os.os == IH_OS_ELF)) { return bootm_find_images(img_addr, conf_ramdisk, conf_fdt, 0, 0); } diff --git a/boot/bootm_os.c b/boot/bootm_os.c index e9522cd3299..a3c7cb5332e 100644 --- a/boot/bootm_os.c +++ b/boot/bootm_os.c @@ -402,7 +402,7 @@ static int do_bootm_elf(int flag, struct bootm_info *bmi) if (flag != BOOTM_STATE_OS_GO) return 0; - bootelf(bmi->images->ep, flags, 0, NULL); + bootelf(bmi->images->ep, flags, bmi->argc, bmi->argv); return 1; } @@ -498,16 +498,18 @@ static int do_bootm_efi(int flag, struct bootm_info *bmi) /* We expect to return */ images->os.type = IH_TYPE_STANDALONE; - image_buf = map_sysmem(images->ep, images->os.image_len); + image_buf = map_sysmem(images->os.image_start, images->os.image_len); /* Run EFI image */ printf("## Transferring control to EFI (at address %08lx) ...\n", - images->ep); + images->os.image_start); bootstage_mark(BOOTSTAGE_ID_RUN_OS); ret = efi_binary_run(image_buf, images->os.image_len, images->ft_len - ? images->ft_addr : EFI_FDT_USE_INTERNAL); + ? images->ft_addr : EFI_FDT_USE_INTERNAL, + (void *)images->initrd_start, + (size_t)(images->initrd_end - images->initrd_start)); return ret; } diff --git a/boot/bootmeth_android.c b/boot/bootmeth_android.c index a5a86b29d7f..654ebfdf1fc 100644 --- a/boot/bootmeth_android.c +++ b/boot/bootmeth_android.c @@ -455,7 +455,8 @@ static int run_avb_verification(struct bootflow *bflow) if (result != AVB_SLOT_VERIFY_RESULT_OK) { printf("Verification failed, reason: %s\n", str_avb_slot_error(result)); - avb_slot_verify_data_free(out_data); + if (out_data) + avb_slot_verify_data_free(out_data); return log_msg_ret("avb verify", -EIO); } boot_state = AVB_GREEN; @@ -465,7 +466,8 @@ static int run_avb_verification(struct bootflow *bflow) result != AVB_SLOT_VERIFY_RESULT_ERROR_VERIFICATION) { printf("Unlocked verification failed, reason: %s\n", str_avb_slot_error(result)); - avb_slot_verify_data_free(out_data); + if (out_data) + avb_slot_verify_data_free(out_data); return log_msg_ret("avb verify unlocked", -EIO); } boot_state = AVB_ORANGE; diff --git a/boot/bootretry.c b/boot/bootretry.c index 587b2de7d6b..a60767eaa2e 100644 --- a/boot/bootretry.c +++ b/boot/bootretry.c @@ -37,6 +37,8 @@ void bootretry_init_cmd_timeout(void) */ void bootretry_reset_cmd_timeout(void) { + /* Parse changes to bootretry */ + bootretry_init_cmd_timeout(); endtime = endtick(retry_time); } diff --git a/boot/image-fit-sig.c b/boot/image-fit-sig.c index a121de60ae2..f23e9d5d0b0 100644 --- a/boot/image-fit-sig.c +++ b/boot/image-fit-sig.c @@ -191,6 +191,11 @@ int fit_image_verify_required_sigs(const void *fit, int image_noffset, int noffset; int key_node; +#ifdef USE_HOSTCC + if (!key_blob) + return 0; +#endif + /* Work out what we need to verify */ *no_sigsp = 1; key_node = fdt_subnode_offset(key_blob, 0, FIT_SIG_NODENAME); @@ -477,6 +482,11 @@ static int fit_config_verify_required_keys(const void *fit, int conf_noffset, bool reqd_policy_all = true; const char *reqd_mode; +#ifdef USE_HOSTCC + if (!key_blob) + return 0; +#endif + /* * We don't support this since libfdt considers names with the * name root but different @ suffix to be equal |