summaryrefslogtreecommitdiffstats
path: root/bootloader/ipod.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-11-20 10:57:53 +0000
committerDave Chapman <dave@dchapman.com>2005-11-20 10:57:53 +0000
commit20eed88b0efad0ff77f7a1d028eeaaa39a4cfc69 (patch)
tree234acbbe8a53ebd6f70dc1647158e82eb118cf1f /bootloader/ipod.c
parent062a0b3c588f8aea755261d2dabdf897b6d7765e (diff)
downloadrockbox-20eed88b0efad0ff77f7a1d028eeaaa39a4cfc69.tar.gz
rockbox-20eed88b0efad0ff77f7a1d028eeaaa39a4cfc69.tar.bz2
rockbox-20eed88b0efad0ff77f7a1d028eeaaa39a4cfc69.zip
iPod: Change bootloader so that Rockbox loads by default. Holding down MENU now boots to the Apple firmware. Check .rockbox/ for a firmware file (to be consistent with the iriver bootloader) and remove the cosmetic sleep.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8012 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/ipod.c')
-rw-r--r--bootloader/ipod.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/bootloader/ipod.c b/bootloader/ipod.c
index 03a814f797..5b8c0ee217 100644
--- a/bootloader/ipod.c
+++ b/bootloader/ipod.c
@@ -220,9 +220,13 @@ int load_rockbox(unsigned char* buf)
int i;
char str[80];
- fd = open("/rockbox.ipod", O_RDONLY);
+ fd = open("/.rockbox/" BOOTFILE, O_RDONLY);
if(fd < 0)
- return -1;
+ {
+ fd = open("/" BOOTFILE, O_RDONLY);
+ if(fd < 0)
+ return -1;
+ }
len = filesize(fd) - 8;
@@ -399,7 +403,7 @@ void* main(void)
/* Check for a keypress */
i=key_pressed();
- if (i==BUTTON_MENU) {
+ if ((i!=BUTTON_MENU) && (i!=BUTTON_PLAY)) {
lcd_puts(0, line, "Loading Rockbox...");
lcd_update();
rc=load_rockbox(loadbuffer);
@@ -410,11 +414,8 @@ void* main(void)
} else {
lcd_puts(0, line++, "Rockbox loaded.");
lcd_update();
-#if 0
- /* Rockbox is not yet runable, so we disable this */
memcpy((void*)DRAM_START,loadbuffer,rc);
return (void*)DRAM_START;
-#endif
}
}
@@ -438,7 +439,7 @@ void* main(void)
lcd_update();
/* Pause for 5 seconds so we can see what's happened */
- usleep(5000000);
+// usleep(5000000);
entry = tblp->addr + tblp->entryOffset;
if (imageno || ((int)tblp->addr & 0xffffff) != 0) {