When the image which bootm is given can't be booted, call panic with
the error message rather than printf/hang so that we can recover from
broken images via a bootcount mechanism. If hang on failure is still
required then CONFIG_PANIC_HANG can still be enabled.

Signed-off-by: Alex Kiernan <alex.kier...@gmail.com>
---

 arch/arm/lib/bootm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index c3c1d2fdfa..a5ed12df74 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -230,8 +230,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!\n");
                }
 #endif
        } else if (BOOTM_ENABLE_TAGS) {
@@ -264,8 +263,7 @@ static void boot_prep_linux(bootm_headers_t *images)
                setup_board_tags(&params);
                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");
        }
 }
 
-- 
2.17.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to