summaryrefslogtreecommitdiff
path: root/apps/plugins/iriver_flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/iriver_flash.c')
-rw-r--r--apps/plugins/iriver_flash.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index 28734d197b..40c9a2979b 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -381,12 +381,13 @@ void show_fatal_error(void)
381 381
382int flash_bootloader(const char *filename) 382int flash_bootloader(const char *filename)
383{ 383{
384 // char buf[32]; 384 char buf[32];
385 int pos, i, len, rc; 385 int pos, i, len, rc;
386 unsigned long checksum, sum, crc32; 386 unsigned long checksum, sum, crc32;
387 unsigned char *p8; 387 unsigned char *p8;
388 uint16_t *p16; 388 uint16_t *p16;
389 389
390 (void)buf;
390 len = load_firmware_file(filename, &checksum); 391 len = load_firmware_file(filename, &checksum);
391 if (len < 0) 392 if (len < 0)
392 return len * 10; 393 return len * 10;
@@ -399,15 +400,16 @@ int flash_bootloader(const char *filename)
399 400
400 /* Verify the crc32 checksum also. */ 401 /* Verify the crc32 checksum also. */
401 crc32 = crc_32(audiobuf, len, 0xffffffff); 402 crc32 = crc_32(audiobuf, len, 0xffffffff);
402 // rb->snprintf(buf, sizeof buf, "crc32 = 0x%08x", crc32); 403#if 0
403 // rb->splash(HZ*10, true, buf); 404 rb->snprintf(buf, sizeof buf, "crc32 = 0x%08x", crc32);
404 405 rb->splash(HZ*10, true, buf);
405 if (crc32 != 0x5361a679) 406#else
407 if (crc32 != 0xa930906d)
406 { 408 {
407 rb->splash(HZ*3, true, "Untested bootloader"); 409 rb->splash(HZ*3, true, "Untested bootloader");
408 return -2; 410 return -2;
409 } 411 }
410 412#endif
411 rb->lcd_puts(0, 3, "Processing critical sections..."); 413 rb->lcd_puts(0, 3, "Processing critical sections...");
412 rb->lcd_update(); 414 rb->lcd_update();
413 415