forked from len0rd/rockbox
Gracefully shutdown unless firmware is found.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10879 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8c834bd57c
commit
973ee5d8d9
2 changed files with 18 additions and 7 deletions
|
@ -351,11 +351,12 @@ bool detect_flashed_rockbox(void)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long valid_bootloaders[][2] =
|
unsigned long valid_bootloaders[][2] = {
|
||||||
{
|
/* Size-8 CRC32 */
|
||||||
{ 62332, 0x77395351 },
|
{ 62332, 0x77395351 }, /* Pre-release v7 */
|
||||||
{ 0, 0 }
|
{ 63340, 0xc41857b6 }, /* Pre-release v7, fixed crash unless firmware found. */
|
||||||
};
|
{ 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
bool detect_valid_bootloader(const unsigned char *addr, int len)
|
bool detect_valid_bootloader(const unsigned char *addr, int len)
|
||||||
|
|
|
@ -508,10 +508,20 @@ void main(void)
|
||||||
eeprom_settings_store();
|
eeprom_settings_store();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(i == 0)
|
if (i == 0)
|
||||||
start_firmware();
|
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 */
|
#endif /* IAUDIO_X5 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue