1
0
Fork 0
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:
Dave Chapman 2009-07-16 00:57:02 +00:00
parent c30d509f34
commit 0270e4c591
3 changed files with 20 additions and 4 deletions

View file

@ -54,4 +54,5 @@ lyre_proto1.c
show_logo.c
#elif defined(IPOD_NANO2G)
ipodnano2g.c
show_logo.c
#endif

View file

@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $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
* modify it under the terms of the GNU General Public License
@ -46,8 +46,15 @@
char version[] = APPSVERSION;
/* Show the Rockbox logo - in show_logo.c */
extern int show_logo(void);
void main(void)
{
lcd_init();
show_logo();
/* Do nothing... */
while(1);
}

View file

@ -45,10 +45,12 @@ _newstart:
newstart2:
msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */
#ifdef ROCKBOX_BIG_ENDIAN
mov r1, #0x80
mrc 15, 0, r0, c1, c0, 0
orr r0, r0, r1
mcr 15, 0, r0, c1, c0, 0 // set bigendian
#endif
ldr r1, =0x3c800000 // disable watchdog
mov r0, #0xa5
@ -80,6 +82,7 @@ newstart2:
// orr r0, r0, r2
// str r0, [r1] // switch backlight on
#if CONFIG_CPU==S5L8700
ldr r1, =0x3c500000 // CLKCON
ldr r0, =0x00800080
str r0, [r1]
@ -232,6 +235,7 @@ newstart2:
ldrhi r1, [r4], #4
strhi r1, [r2], #4
bhi 1b
#endif
/* Initialise bss section to zero */
ldr r2, =_edata
@ -242,6 +246,7 @@ newstart2:
strhi r4, [r2], #4
bhi 1b
#if CONFIG_CPU==S5L8700
/* Copy icode and data to ram */
ldr r2, =_datastart
ldr r3, =_dataend
@ -251,6 +256,7 @@ newstart2:
ldrhi r1, [r4], #4
strhi r1, [r2], #4
bhi 1b
#endif
/* Set up some stack and munge it with 0xdeadbeef */
ldr sp, =_stackend
@ -281,6 +287,7 @@ newstart2:
// if we did not switch remap on, device
// would crash when MENU is pressed,
// as that button is connected to BOOT_MODE pin
#if CONFIG_CPU==S5L8700
ldr r1, =0x38200000
ldr r0, [r1]
mvn r2, #0x10000
@ -288,6 +295,7 @@ newstart2:
mov r2, #0x1
orr r0, r0, r2
str r0, [r1] // remap iram to address 0x0
#endif
bl main