[PATCH 4/4] qi-memory-test-when-no-kernels.patch

Andy Green andy at openmoko.com
Thu Oct 30 09:00:08 CET 2008


This makes a new behaviour for Qi, when there are no valid kernels then it
performs the memory test.  It means you can either move kernels out of the way
to get the memory test, or make an SD Card just with normal Qi on it and no
kernels to get a memory test.

Signed-off-by: Andy Green <andy at openmoko.com>
---

 src/phase2.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/phase2.c b/src/phase2.c
index 3056aa6..847dfc8 100644
--- a/src/phase2.c
+++ b/src/phase2.c
@@ -297,7 +297,20 @@ void bootloader_second_phase(void)
 
 	/* none of the kernels worked out */
 
-	puts("No usable kernel image found, we've had it  :-(\n");
-	while (1)
-		;
+	puts("\nNo usable kernel image found\n");
+
+	/*
+	 * sit there doing a memory test in this case.
+	 *
+	 * This phase 2 code will get destroyed but it's OK, we won't be
+	 * coming back and the whole memory test and dependency functions are
+	 * in phase 1 / steppingstone, so we can test entire memory range.
+	 *
+	 * It means we just boot with SD Card with kernel(s) renamed or removed
+	 * to provoke memory test.
+	 */
+
+	memory_test((void *)this_board->linux_mem_start,
+						    this_board->linux_mem_size);
+
 }




More information about the openmoko-kernel mailing list