summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Ankers <dan@weirdo.org.uk>2006-10-10 19:02:49 +0000
committerDaniel Ankers <dan@weirdo.org.uk>2006-10-10 19:02:49 +0000
commit2740914ee1d9274d77dfb4be6624fb557272ab6f (patch)
tree66615eb47fd3307be1d270fba4d2cbeb0a7efb42
parent55c929747a7524548d26de690ad1c7c111467083 (diff)
downloadrockbox-2740914ee1d9274d77dfb4be6624fb557272ab6f.tar.gz
rockbox-2740914ee1d9274d77dfb4be6624fb557272ab6f.zip
Changes to make Sansa bootloader run. Thanks to Peter Praest.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11177 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--bootloader/e200.c26
-rw-r--r--firmware/boot.lds9
2 files changed, 23 insertions, 12 deletions
diff --git a/bootloader/e200.c b/bootloader/e200.c
index 639c564ca9..91217f5c70 100644
--- a/bootloader/e200.c
+++ b/bootloader/e200.c
@@ -38,13 +38,29 @@
38 38
39void main(void) 39void main(void)
40{ 40{
41 volatile unsigned int* ptr;
41 int i; 42 int i;
42
43 volatile unsigned short *ptr = (unsigned short *)0x14700000;
44 43
45 for(i=0; i< 10000; i++) 44 while(1)
46 *ptr++=i; 45 {
47 while(1); 46 // blink wheel backlight
47 ptr = (volatile unsigned int*)0x70000020;
48 if((*ptr) & (1 << 13))
49 {
50 *ptr = (*ptr) & ~(1 << 13);
51
52 }
53 else
54 {
55 *ptr = (*ptr) | (1 << 13);
56 }
57
58 // wait a while
59 for(i = 0; i < 0xfffff; i++)
60 {
61 }
62
63 }
48} 64}
49 65
50/* These functions are present in the firmware library, but we reimplement 66/* These functions are present in the firmware library, but we reimplement
diff --git a/firmware/boot.lds b/firmware/boot.lds
index f361e45e9e..97a9f784c0 100644
--- a/firmware/boot.lds
+++ b/firmware/boot.lds
@@ -7,15 +7,10 @@ INPUT(target/coldfire/crt0.o)
7#elif defined (CPU_ARM) 7#elif defined (CPU_ARM)
8OUTPUT_FORMAT(elf32-littlearm) 8OUTPUT_FORMAT(elf32-littlearm)
9OUTPUT_ARCH(arm) 9OUTPUT_ARCH(arm)
10#ifndef IPOD_ARCH 10#ifndef CPU_PP
11/* the ipods can't have the crt0.o mentioned here, but the others can't do 11/* PortalPlayer-based machines won't work if crt0 is included */
12 without it! */
13#ifdef CPU_PP
14INPUT(target/arm/crt0-pp.o)
15#else
16INPUT(target/arm/crt0.o) 12INPUT(target/arm/crt0.o)
17#endif 13#endif
18#endif
19#else 14#else
20OUTPUT_FORMAT(elf32-sh) 15OUTPUT_FORMAT(elf32-sh)
21INPUT(target/sh/crt0.o) 16INPUT(target/sh/crt0.o)