summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-07-09 09:04:37 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-07-09 09:04:37 +0000
commita75f0e579f2ef9d1817d363dd76640ea4bb2764f (patch)
tree23e6ec518455a8988e613297971a1516ec7ffbcb
parent52d5b30700a7d696798c789e6d9ca7e63d51b3ca (diff)
downloadrockbox-a75f0e579f2ef9d1817d363dd76640ea4bb2764f.tar.gz
rockbox-a75f0e579f2ef9d1817d363dd76640ea4bb2764f.tar.bz2
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
-rw-r--r--bootloader/main.c23
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 @@
int line = 0;
+char *modelname[] =
+{
+ "H120/140",
+ "H110/115",
+ "H300"
+};
+
int usb_screen(void)
{
return 0;
@@ -94,6 +101,7 @@ int load_firmware(void)
int rc;
int len;
unsigned long chksum;
+ char model[5];
unsigned long sum;
int i;
unsigned char *buf = (unsigned char *)DRAM_START;
@@ -119,6 +127,16 @@ int load_firmware(void)
lcd_puts(0, line++, str);
lcd_update();
+ rc = read(fd, model, 4);
+ if(rc < 4)
+ return -3;
+
+ model[4] = 0;
+
+ snprintf(str, 80, "Model name: %s", model);
+ lcd_puts(0, line++, str);
+ lcd_update();
+
lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET);
rc = read(fd, buf, len);
@@ -197,12 +215,13 @@ void main(void)
lcd_setfont(FONT_SYSFIXED);
- snprintf(buf, 256, "Rockboot version 2");
+ snprintf(buf, 256, "Rockboot version 3");
lcd_puts(0, line++, buf);
sleep(HZ/50); /* Allow the button driver to check the buttons */
- if(button_status() & BUTTON_REC) {
+ if(button_status() & BUTTON_REC ||
+ button_status() & BUTTON_RC_REC) {
lcd_puts(0, 8, "Starting original firmware...");
lcd_update();
start_iriver_fw();