Update of /cvsroot/blob/blob/src/blob
In directory usw-pr-cvs1:/tmp/cvs-serv14366
Modified Files:
chain.S
Log Message:
- Use BLOB_ABS_BASE_ADDR to figure out where the segond stage loader should
be loaded
- Use a trick to let bootldr think that blob-chain is a linux kernel image
so it loads us at the correct position in memory
- The copy size is only 64K instead of 128K
Index: chain.S
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/chain.S,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- chain.S 2001/10/28 20:39:37 1.1
+++ chain.S 2001/11/04 23:12:50 1.2
@@ -45,6 +45,18 @@
sub r0, pc, #8
str r0, START
+#ifdef H3600
+ /* this is a hack to be able to chain load blob from
+ * bootldr. bootldr checks if it can find the linux zImage
+ * magic value at the ninth word of an image, so we just put
+ * it there.
+ */
+ b led
+.org (_start + 9 * 4)
+ .word 0x016f2818
+led:
+#endif
+
/* init LED */
bl ledinit
@@ -63,10 +75,9 @@
ldr r0, START
/* relocate the second stage loader */
- add r2, r0, #(128 * 1024) /* blob is 128kB */
+ add r2, r0, #(64 * 1024) /* blob maximum size is 64kB */
add r0, r0, #0x400 /* skip first 1024 bytes */
- ldr r1, MEM_START
- add r1, r1, #0x400 /* skip over here as well */
+ ldr r1, BLOB_START
/* r0 = source address
* r1 = target address
@@ -86,10 +97,9 @@
/* blob is copied to ram, so jump to it */
- ldr r0, MEM_START
- add r0, r0, #0x400
+ ldr r0, BLOB_START
mov pc, r0
START: .word 0x00000000
-MEM_START: .word MEMORY_START
+BLOB_START: .word BLOB_ABS_BASE_ADDR
|