bootm: do not hang on failure

On ARMv8 systems

    load mmc 0:1 $loadaddr  vmlinuz-5.10.0-3-arm64
    booti

leads to a hanging system requiring to physically reset the system:

    FDT and ATAGS support not compiled in - hanging
    ### ERROR ### Please RESET the board ###

For systems where physical access is difficult hanging is a poor choice.
It is preferable to reset the system when U-Boot reaches a state that is
not recoverable.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Heinrich Schuchardt 2021-02-17 12:55:54 +01:00 committed by Tom Rini
parent a479f103dc
commit 0ca7c4d964

View file

@ -16,7 +16,6 @@
#include <command.h> #include <command.h>
#include <cpu_func.h> #include <cpu_func.h>
#include <dm.h> #include <dm.h>
#include <hang.h>
#include <lmb.h> #include <lmb.h>
#include <log.h> #include <log.h>
#include <asm/global_data.h> #include <asm/global_data.h>
@ -249,8 +248,7 @@ static void boot_prep_linux(bootm_headers_t *images)
#ifdef CONFIG_OF_LIBFDT #ifdef CONFIG_OF_LIBFDT
debug("using: FDT\n"); debug("using: FDT\n");
if (image_setup_linux(images)) { if (image_setup_linux(images)) {
printf("FDT creation failed! hanging..."); panic("FDT creation failed!");
hang();
} }
#endif #endif
} else if (BOOTM_ENABLE_TAGS) { } else if (BOOTM_ENABLE_TAGS) {
@ -283,8 +281,7 @@ static void boot_prep_linux(bootm_headers_t *images)
setup_board_tags(&params); setup_board_tags(&params);
setup_end_tag(gd->bd); setup_end_tag(gd->bd);
} else { } else {
printf("FDT and ATAGS support not compiled in - hanging\n"); panic("FDT and ATAGS support not compiled in\n");
hang();
} }
board_prep_linux(images); board_prep_linux(images);