diff options
-rw-r--r-- | apps/plugins/iriver_flash.c | 11 | ||||
-rw-r--r-- | bootloader/main.c | 14 |
2 files changed, 18 insertions, 7 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c index 1cae1767a9..8cbf75ebd8 100644 --- a/apps/plugins/iriver_flash.c +++ b/apps/plugins/iriver_flash.c | |||
@@ -351,11 +351,12 @@ bool detect_flashed_rockbox(void) | |||
351 | return true; | 351 | return true; |
352 | } | 352 | } |
353 | 353 | ||
354 | unsigned long valid_bootloaders[][2] = | 354 | unsigned long valid_bootloaders[][2] = { |
355 | { | 355 | /* Size-8 CRC32 */ |
356 | { 62332, 0x77395351 }, | 356 | { 62332, 0x77395351 }, /* Pre-release v7 */ |
357 | { 0, 0 } | 357 | { 63340, 0xc41857b6 }, /* Pre-release v7, fixed crash unless firmware found. */ |
358 | }; | 358 | { 0, 0 } |
359 | }; | ||
359 | 360 | ||
360 | 361 | ||
361 | bool detect_valid_bootloader(const unsigned char *addr, int len) | 362 | bool detect_valid_bootloader(const unsigned char *addr, int len) |
diff --git a/bootloader/main.c b/bootloader/main.c index 7c2b1257a9..77866573e9 100644 --- a/bootloader/main.c +++ b/bootloader/main.c | |||
@@ -508,10 +508,20 @@ void main(void) | |||
508 | eeprom_settings_store(); | 508 | eeprom_settings_store(); |
509 | #endif | 509 | #endif |
510 | 510 | ||
511 | if(i == 0) | 511 | if (i == 0) |
512 | start_firmware(); | 512 | start_firmware(); |
513 | 513 | ||
514 | start_iriver_fw(); | 514 | if (detect_flashed_rockbox()) |
515 | { | ||
516 | printf("No firmware found on disk"); | ||
517 | printf("Powering off..."); | ||
518 | lcd_update(); | ||
519 | ata_sleep(); | ||
520 | sleep(HZ*4); | ||
521 | power_off(); | ||
522 | } | ||
523 | else | ||
524 | start_iriver_fw(); | ||
515 | #endif /* IAUDIO_X5 */ | 525 | #endif /* IAUDIO_X5 */ |
516 | } | 526 | } |
517 | 527 | ||