[PATCH 08/13] qi-gta02-remap-steppingstone.patch

Andy Green andy at openmoko.com
Mon Dec 1 02:16:21 CET 2008


Despite what the docs say, steppingstone is always resident at
0x40000000 on s3c2442, this patch changes our linker script to
stick all steppingstone code there.  The mapping of steppingstone
at 0x0 is broken by OM[] bus change dynamically caused for example
by GTA02 AUX button actuation.

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

 src/cpu/s3c2442/qi.lds |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/cpu/s3c2442/qi.lds b/src/cpu/s3c2442/qi.lds
index c23b447..600f950 100644
--- a/src/cpu/s3c2442/qi.lds
+++ b/src/cpu/s3c2442/qi.lds
@@ -27,20 +27,21 @@ OUTPUT_ARCH(arm)
 ENTRY(_start)
 SECTIONS
 {
-	. = 0x00000000;
+	__steppingstone_always = 0x40000000;
+	__qi_sdram_copy = 0x33000000;
+
+	. = __steppingstone_always;
 
 	/* this is intended to take the first 4KBytes of stuff initially.
 	 * We have to make sure we have .rodata* in there for everything
 	 * because we do not compile PIC.
 	 */
 
-	. = ALIGN(4);
-	.text      :
+	.text __steppingstone_always : AT (0x0)
 	{
 	  src/cpu/s3c2442/start.o		(.text .rodata* .data .bss)
 	  src/cpu/s3c2442/lowlevel_init.o	(.text .rodata* .data .bss)
 	  src/cpu/s3c2442/start_qi.o		(.text .rodata* .data .bss)
-/*	  src/blink_led.o			(.text .rodata* .data .bss) */
 	  src/cpu/s3c2442/nand_read.o		(.text .rodata* .data .bss)
 	  src/cpu/s3c2442/serial-s3c24xx.o	(.text .rodata* .data .bss)
 	  src/memory-test.o			(.text .rodata* .data .bss)
@@ -50,10 +51,10 @@ SECTIONS
 	}
 
 	. = ALIGN(4);
-	.everything_else  ADDR (.text) + SIZEOF (.text) + 0x33000000 :
-		AT ( ADDR (.text) + SIZEOF (.text) ) { *(.text .rodata* .data) }
+	.everything_else  ADDR (.text) - __steppingstone_always + SIZEOF (.text) + __qi_sdram_copy :
+		AT ( ADDR (.text) - __steppingstone_always + SIZEOF (.text) ) { *(.text .rodata* .data) }
 
-	. = 0x33800000 ;
+	. = __qi_sdram_copy + 0x800000 ;
 	__bss_start = .;
 	.bss (NOLOAD) : 
     { 




More information about the openmoko-kernel mailing list