diff options
author | Dave Chapman <dave@dchapman.com> | 2009-10-11 01:37:12 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2009-10-11 01:37:12 +0000 |
commit | b04a7a86e1d903a37091486764d0dfe09372d663 (patch) | |
tree | 35c74cc921eb641858269c30c2add4e436d97ec8 /firmware/target/arm/s5l8700/crt0.S | |
parent | a27f2b8683204e337b142124979592ee1cd0d6f9 (diff) | |
download | rockbox-b04a7a86e1d903a37091486764d0dfe09372d663.tar.gz rockbox-b04a7a86e1d903a37091486764d0dfe09372d663.zip |
Make the Nano2G bootloader actually function as a bootloader. The resulting bootloader-ipodnano2g.ipod file needs to be encrypted on a target using the crypt_firmware plugin to create bootloader-ipodnano2g.ipodx, which can then be written to the firmware partition using the ipodpatcher patch at FS#10609. Dual-booting doesn't work yet - only Rockbox can be run.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23084 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s5l8700/crt0.S')
-rw-r--r-- | firmware/target/arm/s5l8700/crt0.S | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/firmware/target/arm/s5l8700/crt0.S b/firmware/target/arm/s5l8700/crt0.S index 4a89f3da39..aa2923cb29 100644 --- a/firmware/target/arm/s5l8700/crt0.S +++ b/firmware/target/arm/s5l8700/crt0.S | |||
@@ -27,7 +27,11 @@ | |||
27 | .global _newstart | 27 | .global _newstart |
28 | /* Exception vectors */ | 28 | /* Exception vectors */ |
29 | start: | 29 | start: |
30 | #if CONFIG_CPU==S5L8701 && defined(BOOTLOADER) | ||
31 | b newstart2 | ||
32 | #else | ||
30 | b _newstart | 33 | b _newstart |
34 | #endif | ||
31 | ldr pc, =undef_instr_handler | 35 | ldr pc, =undef_instr_handler |
32 | ldr pc, =software_int_handler | 36 | ldr pc, =software_int_handler |
33 | ldr pc, =prefetch_abort_handler | 37 | ldr pc, =prefetch_abort_handler |
@@ -88,7 +92,22 @@ newstart2: | |||
88 | orr r2, r2, #1 | 92 | orr r2, r2, #1 |
89 | bic r2, r2, #0x10000 | 93 | bic r2, r2, #0x10000 |
90 | str r2, [r1] // remap iram to address 0x0 | 94 | str r2, [r1] // remap iram to address 0x0 |
91 | #endif | 95 | |
96 | #ifdef BOOTLOADER | ||
97 | /* Relocate ourself to IRAM - we have been loaded to DRAM */ | ||
98 | mov r0, #0x08000000 /* source (DRAM) */ | ||
99 | mov r1, #0x00000000 /* dest (IRAM) */ | ||
100 | ldr r2, =_dataend | ||
101 | 1: | ||
102 | cmp r2, r1 | ||
103 | ldrhi r3, [r0], #4 | ||
104 | strhi r3, [r1], #4 | ||
105 | bhi 1b | ||
106 | |||
107 | ldr pc, =start_loc /* jump to the relocated start_loc: */ | ||
108 | start_loc: | ||
109 | #endif /* BOOTLOADER */ | ||
110 | #endif /* CONFIG_CPU==S5L8701 */ | ||
92 | 111 | ||
93 | ldr r1, =0x3c500000 // CLKCON | 112 | ldr r1, =0x3c500000 // CLKCON |
94 | ldr r0, =0x00800080 | 113 | ldr r0, =0x00800080 |