diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-23 05:08:36 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-23 05:08:36 +0000 |
commit | 1ec821244afc4f671c0c94519cd3a70b2777bf74 (patch) | |
tree | 748eead72f705c1e3a91120dc890be49617239c9 /bootloader/ondavx747.c | |
parent | 28bcc17ddef4cfad2d1a669869f2f81f0724acb9 (diff) | |
download | rockbox-1ec821244afc4f671c0c94519cd3a70b2777bf74.tar.gz rockbox-1ec821244afc4f671c0c94519cd3a70b2777bf74.zip |
Sansa AMS bootloader: enter USB mode only when needed
- If an error happens when reading partitions / rockbox.sansa
- If the select button was pressed
add an argument to error() to not power off, when we're going to enter
USB mode to try to fix the problem, but display the error message anyway
for debugging purpose
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27075 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/ondavx747.c')
-rw-r--r-- | bootloader/ondavx747.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bootloader/ondavx747.c b/bootloader/ondavx747.c index 4dfc78d58c..2903b04252 100644 --- a/bootloader/ondavx747.c +++ b/bootloader/ondavx747.c | |||
@@ -94,7 +94,7 @@ static int boot_of(void) | |||
94 | printf("Mounting disk..."); | 94 | printf("Mounting disk..."); |
95 | rc = disk_mount_all(); | 95 | rc = disk_mount_all(); |
96 | if (rc <= 0) | 96 | if (rc <= 0) |
97 | error(EDISK,rc); | 97 | error(EDISK, rc, true); |
98 | 98 | ||
99 | /* TODO: get this from the NAND flash instead of SD */ | 99 | /* TODO: get this from the NAND flash instead of SD */ |
100 | fd = open("/ccpmp.bin", O_RDONLY); | 100 | fd = open("/ccpmp.bin", O_RDONLY); |
@@ -147,7 +147,7 @@ static int boot_rockbox(void) | |||
147 | printf("Mounting disk..."); | 147 | printf("Mounting disk..."); |
148 | rc = disk_mount_all(); | 148 | rc = disk_mount_all(); |
149 | if (rc <= 0) | 149 | if (rc <= 0) |
150 | error(EDISK,rc); | 150 | error(EDISK,rc, true); |
151 | 151 | ||
152 | printf("Loading firmware..."); | 152 | printf("Loading firmware..."); |
153 | rc = load_firmware((unsigned char *)CONFIG_SDRAM_START, BOOTFILE, 0x400000); | 153 | rc = load_firmware((unsigned char *)CONFIG_SDRAM_START, BOOTFILE, 0x400000); |
@@ -172,7 +172,7 @@ static void reset_configuration(void) | |||
172 | 172 | ||
173 | rc = disk_mount_all(); | 173 | rc = disk_mount_all(); |
174 | if (rc <= 0) | 174 | if (rc <= 0) |
175 | error(EDISK,rc); | 175 | error(EDISK,rc, true); |
176 | 176 | ||
177 | if(rename(ROCKBOX_DIR "/config.cfg", ROCKBOX_DIR "/config.old") == 0) | 177 | if(rename(ROCKBOX_DIR "/config.cfg", ROCKBOX_DIR "/config.old") == 0) |
178 | show_splash(HZ/2, "Configuration reset successfully!"); | 178 | show_splash(HZ/2, "Configuration reset successfully!"); |
@@ -271,7 +271,7 @@ int main(void) | |||
271 | 271 | ||
272 | rc = storage_init(); | 272 | rc = storage_init(); |
273 | if(rc) | 273 | if(rc) |
274 | error(EATA, rc); | 274 | error(EATA, rc, true); |
275 | 275 | ||
276 | /* Don't mount the disks yet, there could be file system/partition errors | 276 | /* Don't mount the disks yet, there could be file system/partition errors |
277 | which are fixable in USB mode */ | 277 | which are fixable in USB mode */ |