From e1eb91b976621f03fe7082e5290f47d09f6d7b2e Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Wed, 9 Aug 2006 12:04:13 +0000 Subject: 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 --- apps/plugins/iriver_flash.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'apps/plugins/iriver_flash.c') 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(); -- cgit v1.1