forked from len0rd/rockbox
Get the Nano2G bootloader running - it now runs and displays a logo on one type of Nano2G LCD.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21900 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c30d509f34
commit
0270e4c591
3 changed files with 20 additions and 4 deletions
|
|
@ -54,4 +54,5 @@ lyre_proto1.c
|
||||||
show_logo.c
|
show_logo.c
|
||||||
#elif defined(IPOD_NANO2G)
|
#elif defined(IPOD_NANO2G)
|
||||||
ipodnano2g.c
|
ipodnano2g.c
|
||||||
|
show_logo.c
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009 by ???? [to be completed by first author]
|
* Copyright (C) 2009 by Dave Chapman
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
|
@ -46,8 +46,15 @@
|
||||||
|
|
||||||
char version[] = APPSVERSION;
|
char version[] = APPSVERSION;
|
||||||
|
|
||||||
|
/* Show the Rockbox logo - in show_logo.c */
|
||||||
|
extern int show_logo(void);
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
|
lcd_init();
|
||||||
|
|
||||||
|
show_logo();
|
||||||
|
|
||||||
/* Do nothing... */
|
/* Do nothing... */
|
||||||
while(1);
|
while(1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,12 @@ _newstart:
|
||||||
newstart2:
|
newstart2:
|
||||||
msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
|
msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
|
||||||
|
|
||||||
|
#ifdef ROCKBOX_BIG_ENDIAN
|
||||||
mov r1, #0x80
|
mov r1, #0x80
|
||||||
mrc 15, 0, r0, c1, c0, 0
|
mrc 15, 0, r0, c1, c0, 0
|
||||||
orr r0, r0, r1
|
orr r0, r0, r1
|
||||||
mcr 15, 0, r0, c1, c0, 0 // set bigendian
|
mcr 15, 0, r0, c1, c0, 0 // set bigendian
|
||||||
|
#endif
|
||||||
|
|
||||||
ldr r1, =0x3c800000 // disable watchdog
|
ldr r1, =0x3c800000 // disable watchdog
|
||||||
mov r0, #0xa5
|
mov r0, #0xa5
|
||||||
|
|
@ -80,6 +82,7 @@ newstart2:
|
||||||
// orr r0, r0, r2
|
// orr r0, r0, r2
|
||||||
// str r0, [r1] // switch backlight on
|
// str r0, [r1] // switch backlight on
|
||||||
|
|
||||||
|
#if CONFIG_CPU==S5L8700
|
||||||
ldr r1, =0x3c500000 // CLKCON
|
ldr r1, =0x3c500000 // CLKCON
|
||||||
ldr r0, =0x00800080
|
ldr r0, =0x00800080
|
||||||
str r0, [r1]
|
str r0, [r1]
|
||||||
|
|
@ -232,6 +235,7 @@ newstart2:
|
||||||
ldrhi r1, [r4], #4
|
ldrhi r1, [r4], #4
|
||||||
strhi r1, [r2], #4
|
strhi r1, [r2], #4
|
||||||
bhi 1b
|
bhi 1b
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialise bss section to zero */
|
/* Initialise bss section to zero */
|
||||||
ldr r2, =_edata
|
ldr r2, =_edata
|
||||||
|
|
@ -242,6 +246,7 @@ newstart2:
|
||||||
strhi r4, [r2], #4
|
strhi r4, [r2], #4
|
||||||
bhi 1b
|
bhi 1b
|
||||||
|
|
||||||
|
#if CONFIG_CPU==S5L8700
|
||||||
/* Copy icode and data to ram */
|
/* Copy icode and data to ram */
|
||||||
ldr r2, =_datastart
|
ldr r2, =_datastart
|
||||||
ldr r3, =_dataend
|
ldr r3, =_dataend
|
||||||
|
|
@ -251,6 +256,7 @@ newstart2:
|
||||||
ldrhi r1, [r4], #4
|
ldrhi r1, [r4], #4
|
||||||
strhi r1, [r2], #4
|
strhi r1, [r2], #4
|
||||||
bhi 1b
|
bhi 1b
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set up some stack and munge it with 0xdeadbeef */
|
/* Set up some stack and munge it with 0xdeadbeef */
|
||||||
ldr sp, =_stackend
|
ldr sp, =_stackend
|
||||||
|
|
@ -281,6 +287,7 @@ newstart2:
|
||||||
// if we did not switch remap on, device
|
// if we did not switch remap on, device
|
||||||
// would crash when MENU is pressed,
|
// would crash when MENU is pressed,
|
||||||
// as that button is connected to BOOT_MODE pin
|
// as that button is connected to BOOT_MODE pin
|
||||||
|
#if CONFIG_CPU==S5L8700
|
||||||
ldr r1, =0x38200000
|
ldr r1, =0x38200000
|
||||||
ldr r0, [r1]
|
ldr r0, [r1]
|
||||||
mvn r2, #0x10000
|
mvn r2, #0x10000
|
||||||
|
|
@ -288,6 +295,7 @@ newstart2:
|
||||||
mov r2, #0x1
|
mov r2, #0x1
|
||||||
orr r0, r0, r2
|
orr r0, r0, r2
|
||||||
str r0, [r1] // remap iram to address 0x0
|
str r0, [r1] // remap iram to address 0x0
|
||||||
|
#endif
|
||||||
|
|
||||||
bl main
|
bl main
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue