diff options
-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 @@ 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(); |