[U-Boot] [PATCH] bootm: fdt: Use panic() instead of hang() when presented with a bad image
Alex Kiernan
alex.kiernan at gmail.com
Tue Sep 18 08:10:13 UTC 2018
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.kiernan at 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(¶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");
}
}
--
2.17.1
More information about the U-Boot
mailing list