mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
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
This commit is contained in:
parent
a27f2b8683
commit
b04a7a86e1
6 changed files with 138 additions and 41 deletions
|
|
@ -27,7 +27,11 @@
|
|||
.global _newstart
|
||||
/* Exception vectors */
|
||||
start:
|
||||
#if CONFIG_CPU==S5L8701 && defined(BOOTLOADER)
|
||||
b newstart2
|
||||
#else
|
||||
b _newstart
|
||||
#endif
|
||||
ldr pc, =undef_instr_handler
|
||||
ldr pc, =software_int_handler
|
||||
ldr pc, =prefetch_abort_handler
|
||||
|
|
@ -88,7 +92,22 @@ newstart2:
|
|||
orr r2, r2, #1
|
||||
bic r2, r2, #0x10000
|
||||
str r2, [r1] // remap iram to address 0x0
|
||||
#endif
|
||||
|
||||
#ifdef BOOTLOADER
|
||||
/* Relocate ourself to IRAM - we have been loaded to DRAM */
|
||||
mov r0, #0x08000000 /* source (DRAM) */
|
||||
mov r1, #0x00000000 /* dest (IRAM) */
|
||||
ldr r2, =_dataend
|
||||
1:
|
||||
cmp r2, r1
|
||||
ldrhi r3, [r0], #4
|
||||
strhi r3, [r1], #4
|
||||
bhi 1b
|
||||
|
||||
ldr pc, =start_loc /* jump to the relocated start_loc: */
|
||||
start_loc:
|
||||
#endif /* BOOTLOADER */
|
||||
#endif /* CONFIG_CPU==S5L8701 */
|
||||
|
||||
ldr r1, =0x3c500000 // CLKCON
|
||||
ldr r0, =0x00800080
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue