summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-09-04 16:06:11 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-09-04 16:06:11 +0000
commit973ee5d8d9ecb16bfbe69b9869f7dd57159765c2 (patch)
treea4b2ab52a490a02f7cc0a3c54d457a06f8f08a15 /bootloader
parent8c834bd57c9d90128741b0ab9060eac233f5a2c7 (diff)
downloadrockbox-973ee5d8d9ecb16bfbe69b9869f7dd57159765c2.tar.gz
rockbox-973ee5d8d9ecb16bfbe69b9869f7dd57159765c2.tar.bz2
rockbox-973ee5d8d9ecb16bfbe69b9869f7dd57159765c2.zip
Gracefully shutdown unless firmware is found.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10879 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/main.c14
1 files changed, 12 insertions, 2 deletions
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)
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 */
}