diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-09 12:04:13 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-08-09 12:04:13 +0000 |
| commit | e1eb91b976621f03fe7082e5290f47d09f6d7b2e (patch) | |
| tree | eca734c2a193dc8f933b784a72969ccc3b9101ea /apps/plugins/iriver_flash.c | |
| parent | 0f87f8fd366b0869c001a7d4e8ca6b2e27065e7b (diff) | |
| download | rockbox-e1eb91b976621f03fe7082e5290f47d09f6d7b2e.zip rockbox-e1eb91b976621f03fe7082e5290f47d09f6d7b2e.tar.gz rockbox-e1eb91b976621f03fe7082e5290f47d09f6d7b2e.tar.bz2 rockbox-e1eb91b976621f03fe7082e5290f47d09f6d7b2e.tar.xz | |
Bootloader support to search firmware also from flash. Bootloader <->
Rockbox communication when Rockbox has been flashed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10499 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/iriver_flash.c')
| -rw-r--r-- | apps/plugins/iriver_flash.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c index 28734d1..40c9a29 100644 --- a/apps/plugins/iriver_flash.c +++ b/apps/plugins/iriver_flash.c @@ -381,12 +381,13 @@ void show_fatal_error(void) int flash_bootloader(const char *filename) { - // char buf[32]; + char buf[32]; int pos, i, len, rc; unsigned long checksum, sum, crc32; unsigned char *p8; uint16_t *p16; + (void)buf; len = load_firmware_file(filename, &checksum); if (len < 0) return len * 10; @@ -399,15 +400,16 @@ int flash_bootloader(const char *filename) /* Verify the crc32 checksum also. */ crc32 = crc_32(audiobuf, len, 0xffffffff); - // rb->snprintf(buf, sizeof buf, "crc32 = 0x%08x", crc32); - // rb->splash(HZ*10, true, buf); - - if (crc32 != 0x5361a679) +#if 0 + rb->snprintf(buf, sizeof buf, "crc32 = 0x%08x", crc32); + rb->splash(HZ*10, true, buf); +#else + if (crc32 != 0xa930906d) { rb->splash(HZ*3, true, "Untested bootloader"); return -2; } - +#endif rb->lcd_puts(0, 3, "Processing critical sections..."); rb->lcd_update(); |