From: Heinrich Schuchardt Date: Wed, 17 Feb 2021 11:55:54 +0000 (+0100) Subject: bootm: do not hang on failure X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=0ca7c4d964dcce1ca3e0f7e1cdb8031561fdeab6;p=u-boot.git 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 Reviewed-by: Simon Glass --- diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 11af9e2fb9..f60ee3a7e6 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -249,8 +248,7 @@ static void boot_prep_linux(bootm_headers_t *images) #ifdef CONFIG_OF_LIBFDT debug("using: FDT\n"); if (image_setup_linux(images)) { - printf("FDT creation failed! hanging..."); - hang(); + panic("FDT creation failed!"); } #endif } else if (BOOTM_ENABLE_TAGS) { @@ -283,8 +281,7 @@ static void boot_prep_linux(bootm_headers_t *images) setup_board_tags(¶ms); setup_end_tag(gd->bd); } else { - printf("FDT and ATAGS support not compiled in - hanging\n"); - hang(); + panic("FDT and ATAGS support not compiled in\n"); } board_prep_linux(images);