mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
PP bootloader:
1) Proper error handling when we can't find the firmware. 2) Show verbose debug messages when any button is pressed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12847 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
739ff041ac
commit
0c1a304620
1 changed files with 6 additions and 6 deletions
|
@ -106,11 +106,9 @@ static void chksum_crc32gentab (void)
|
||||||
|
|
||||||
/* Button definitions */
|
/* Button definitions */
|
||||||
#if CONFIG_KEYPAD == IRIVER_H10_PAD
|
#if CONFIG_KEYPAD == IRIVER_H10_PAD
|
||||||
#define BOOTLOADER_VERBOSE BUTTON_PLAY
|
|
||||||
#define BOOTLOADER_BOOT_OF BUTTON_LEFT
|
#define BOOTLOADER_BOOT_OF BUTTON_LEFT
|
||||||
|
|
||||||
#elif CONFIG_KEYPAD == SANSA_E200_PAD
|
#elif CONFIG_KEYPAD == SANSA_E200_PAD
|
||||||
#define BOOTLOADER_VERBOSE BUTTON_RIGHT
|
|
||||||
#define BOOTLOADER_BOOT_OF BUTTON_LEFT
|
#define BOOTLOADER_BOOT_OF BUTTON_LEFT
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -291,8 +289,8 @@ void* main(void)
|
||||||
|
|
||||||
btn = button_read_device();
|
btn = button_read_device();
|
||||||
|
|
||||||
/* Enable bootloader messages */
|
/* Enable bootloader messages if any button is pressed */
|
||||||
if (btn & BOOTLOADER_VERBOSE)
|
if (btn)
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
|
||||||
lcd_setfont(FONT_SYSFIXED);
|
lcd_setfont(FONT_SYSFIXED);
|
||||||
|
@ -380,6 +378,8 @@ void* main(void)
|
||||||
return (void*)loadbuffer;
|
return (void*)loadbuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error(EBOOTFILE, rc);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
printf("Loading Rockbox...");
|
printf("Loading Rockbox...");
|
||||||
rc=load_mi4(loadbuffer, BOOTFILE, MAX_LOADSIZE);
|
rc=load_mi4(loadbuffer, BOOTFILE, MAX_LOADSIZE);
|
||||||
|
@ -391,7 +391,7 @@ void* main(void)
|
||||||
rc=load_firmware(loadbuffer, OLD_BOOTFILE, MAX_LOADSIZE);
|
rc=load_firmware(loadbuffer, OLD_BOOTFILE, MAX_LOADSIZE);
|
||||||
if (rc < EOK) {
|
if (rc < EOK) {
|
||||||
printf("Can't load %s:", OLD_BOOTFILE);
|
printf("Can't load %s:", OLD_BOOTFILE);
|
||||||
printf(strerror(rc));
|
error(EBOOTFILE, rc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue