From a75f0e579f2ef9d1817d363dd76640ea4bb2764f Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sat, 9 Jul 2005 09:04:37 +0000 Subject: 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 --- bootloader/main.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'bootloader') 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(); -- cgit v1.2.3