forked from len0rd/rockbox
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
This commit is contained in:
parent
52d5b30700
commit
a75f0e579f
1 changed files with 21 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue