summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/iriver_flash.c11
-rw-r--r--bootloader/main.c14
2 files changed, 18 insertions, 7 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index 1cae176..8cbf75e 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -351,11 +351,12 @@ bool detect_flashed_rockbox(void)
return true;
}
-unsigned long valid_bootloaders[][2] =
- {
- { 62332, 0x77395351 },
- { 0, 0 }
- };
+unsigned long valid_bootloaders[][2] = {
+ /* Size-8 CRC32 */
+ { 62332, 0x77395351 }, /* Pre-release v7 */
+ { 63340, 0xc41857b6 }, /* Pre-release v7, fixed crash unless firmware found. */
+ { 0, 0 }
+};
bool detect_valid_bootloader(const unsigned char *addr, int len)
diff --git a/bootloader/main.c b/bootloader/main.c
index 7c2b125..7786657 100644
--- a/bootloader/main.c
+++ b/bootloader/main.c
@@ -508,10 +508,20 @@ void main(void)
eeprom_settings_store();
#endif
- if(i == 0)
+ if (i == 0)
start_firmware();
- start_iriver_fw();
+ if (detect_flashed_rockbox())
+ {
+ printf("No firmware found on disk");
+ printf("Powering off...");
+ lcd_update();
+ ata_sleep();
+ sleep(HZ*4);
+ power_off();
+ }
+ else
+ start_iriver_fw();
#endif /* IAUDIO_X5 */
}