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 ++++++++------ apps/plugins/viewers.config | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'apps/plugins') 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(); diff --git a/apps/plugins/viewers.config b/apps/plugins/viewers.config index 5e1c628..cc05bbc 100644 --- a/apps/plugins/viewers.config +++ b/apps/plugins/viewers.config @@ -22,3 +22,4 @@ wav,viewers/mp3_encoder, 00 00 00 00 00 00 wav,viewers/wavplay,60 7F 05 35 3F 00 bmp,rocks/rockpaint, 01 10 01 10 01 10 m2v,viewers/mpegplayer,5D 7F 5D 7F 5D 7F +iriver,viewers/iriver_flash,2A 7F 41 41 7F 2A -- cgit v1.1