diff options
Diffstat (limited to 'bootloader/main.c')
-rw-r--r-- | bootloader/main.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bootloader/main.c b/bootloader/main.c index 5cc2edad2e..0a18bed9ec 100644 --- a/bootloader/main.c +++ b/bootloader/main.c | |||
@@ -63,7 +63,7 @@ int load_firmware(void) | |||
63 | unsigned char *buf = (unsigned char *)0x30000000; | 63 | unsigned char *buf = (unsigned char *)0x30000000; |
64 | char str[80]; | 64 | char str[80]; |
65 | 65 | ||
66 | fd = open("/rockbox.bin", O_RDONLY); | 66 | fd = open("/rockbox.iriver", O_RDONLY); |
67 | if(fd < 0) | 67 | if(fd < 0) |
68 | return -1; | 68 | return -1; |
69 | 69 | ||
@@ -73,7 +73,7 @@ int load_firmware(void) | |||
73 | lcd_puts(0, line++, str); | 73 | lcd_puts(0, line++, str); |
74 | lcd_update(); | 74 | lcd_update(); |
75 | 75 | ||
76 | lseek(fd, 0, SEEK_SET); | 76 | lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET); |
77 | 77 | ||
78 | rc = read(fd, &chksum, 4); | 78 | rc = read(fd, &chksum, 4); |
79 | if(rc < 4) | 79 | if(rc < 4) |
@@ -83,7 +83,7 @@ int load_firmware(void) | |||
83 | lcd_puts(0, line++, str); | 83 | lcd_puts(0, line++, str); |
84 | lcd_update(); | 84 | lcd_update(); |
85 | 85 | ||
86 | lseek(fd, 4, SEEK_CUR); | 86 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); |
87 | 87 | ||
88 | rc = read(fd, buf, len); | 88 | rc = read(fd, buf, len); |
89 | if(rc < len) | 89 | if(rc < len) |
@@ -139,7 +139,7 @@ int main(void) | |||
139 | sleep(HZ/10); /* Allow the button driver to check the buttons */ | 139 | sleep(HZ/10); /* Allow the button driver to check the buttons */ |
140 | 140 | ||
141 | if(button_status() & BUTTON_REC) { | 141 | if(button_status() & BUTTON_REC) { |
142 | lcd_puts(0, 8, "Ninjax"); | 142 | lcd_puts(0, 8, "Starting original firmware..."); |
143 | lcd_update(); | 143 | lcd_update(); |
144 | sleep(HZ); | 144 | sleep(HZ); |
145 | start_iriver_fw(); | 145 | start_iriver_fw(); |
@@ -148,8 +148,6 @@ int main(void) | |||
148 | GPIO_FUNCTION |= 0x40000040; | 148 | GPIO_FUNCTION |= 0x40000040; |
149 | GPIO1_FUNCTION |= 0x00000062; | 149 | GPIO1_FUNCTION |= 0x00000062; |
150 | 150 | ||
151 | GPIO1_ENABLE |= 0x00000000; | ||
152 | |||
153 | IDECONFIG1 = 0x00107000; | 151 | IDECONFIG1 = 0x00107000; |
154 | IDECONFIG2 = 0x00040000; | 152 | IDECONFIG2 = 0x00040000; |
155 | 153 | ||