diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-07-09 09:04:37 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-07-09 09:04:37 +0000 |
commit | a75f0e579f2ef9d1817d363dd76640ea4bb2764f (patch) | |
tree | 23e6ec518455a8988e613297971a1516ec7ffbcb /bootloader | |
parent | 52d5b30700a7d696798c789e6d9ca7e63d51b3ca (diff) | |
download | rockbox-a75f0e579f2ef9d1817d363dd76640ea4bb2764f.tar.gz rockbox-a75f0e579f2ef9d1817d363dd76640ea4bb2764f.zip |
iriver bootloader: display the model number for which the rockbox.iriver was built, start original firmware with rec+play on the remote, bumped to version 3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7085 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r-- | bootloader/main.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/bootloader/main.c b/bootloader/main.c index 5cc995c855..63641c5d9a 100644 --- a/bootloader/main.c +++ b/bootloader/main.c | |||
@@ -45,6 +45,13 @@ | |||
45 | 45 | ||
46 | int line = 0; | 46 | int line = 0; |
47 | 47 | ||
48 | char *modelname[] = | ||
49 | { | ||
50 | "H120/140", | ||
51 | "H110/115", | ||
52 | "H300" | ||
53 | }; | ||
54 | |||
48 | int usb_screen(void) | 55 | int usb_screen(void) |
49 | { | 56 | { |
50 | return 0; | 57 | return 0; |
@@ -94,6 +101,7 @@ int load_firmware(void) | |||
94 | int rc; | 101 | int rc; |
95 | int len; | 102 | int len; |
96 | unsigned long chksum; | 103 | unsigned long chksum; |
104 | char model[5]; | ||
97 | unsigned long sum; | 105 | unsigned long sum; |
98 | int i; | 106 | int i; |
99 | unsigned char *buf = (unsigned char *)DRAM_START; | 107 | unsigned char *buf = (unsigned char *)DRAM_START; |
@@ -119,6 +127,16 @@ int load_firmware(void) | |||
119 | lcd_puts(0, line++, str); | 127 | lcd_puts(0, line++, str); |
120 | lcd_update(); | 128 | lcd_update(); |
121 | 129 | ||
130 | rc = read(fd, model, 4); | ||
131 | if(rc < 4) | ||
132 | return -3; | ||
133 | |||
134 | model[4] = 0; | ||
135 | |||
136 | snprintf(str, 80, "Model name: %s", model); | ||
137 | lcd_puts(0, line++, str); | ||
138 | lcd_update(); | ||
139 | |||
122 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); | 140 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); |
123 | 141 | ||
124 | rc = read(fd, buf, len); | 142 | rc = read(fd, buf, len); |
@@ -197,12 +215,13 @@ void main(void) | |||
197 | 215 | ||
198 | lcd_setfont(FONT_SYSFIXED); | 216 | lcd_setfont(FONT_SYSFIXED); |
199 | 217 | ||
200 | snprintf(buf, 256, "Rockboot version 2"); | 218 | snprintf(buf, 256, "Rockboot version 3"); |
201 | lcd_puts(0, line++, buf); | 219 | lcd_puts(0, line++, buf); |
202 | 220 | ||
203 | sleep(HZ/50); /* Allow the button driver to check the buttons */ | 221 | sleep(HZ/50); /* Allow the button driver to check the buttons */ |
204 | 222 | ||
205 | if(button_status() & BUTTON_REC) { | 223 | if(button_status() & BUTTON_REC || |
224 | button_status() & BUTTON_RC_REC) { | ||
206 | lcd_puts(0, 8, "Starting original firmware..."); | 225 | lcd_puts(0, 8, "Starting original firmware..."); |
207 | lcd_update(); | 226 | lcd_update(); |
208 | start_iriver_fw(); | 227 | start_iriver_fw(); |