[PATCH 1/2] ARM pbl: Provide a dummy error function for the decompressor
Sascha Hauer
s.hauer at pengutronix.de
Tue Oct 2 09:06:56 EDT 2012
We can't do anything useful in the error function, so we just hang.
This has the advantage that at least when a JTAG debugger is connected
we can see what happens. Otherwise the code just jumps to NULL in case
of an error.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/cpu/start-pbl.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index 932a3da..2cd33ce 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -113,6 +113,11 @@ static void mmu_disable(void)
__mmu_cache_off();
}
+void noinline errorfn(char *error)
+{
+ while (1);
+}
+
static void barebox_uncompress(void *compressed_start, unsigned int len)
{
void (*barebox)(void);
@@ -135,7 +140,7 @@ static void barebox_uncompress(void *compressed_start, unsigned int len)
decompress((void *)compressed_start,
len,
NULL, NULL,
- (void *)TEXT_BASE, NULL, NULL);
+ (void *)TEXT_BASE, NULL, errorfn);
if (use_mmu)
mmu_disable();
--
1.7.10.4
More information about the barebox
mailing list