summaryrefslogtreecommitdiffstats
path: root/apps/plugins/iriver_flash.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2008-02-09 15:06:09 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2008-02-09 15:06:09 +0000
commit698113d9db061f00a4d0cd2196b46f5d3c64f4fb (patch)
tree2f0dbd4ba9c8067ac74fdefec259f6a4da156609 /apps/plugins/iriver_flash.c
parentc6e9b8b7e15bb6eb0a4c0e6614a91c04427c9d3d (diff)
downloadrockbox-698113d9db061f00a4d0cd2196b46f5d3c64f4fb.tar.gz
rockbox-698113d9db061f00a4d0cd2196b46f5d3c64f4fb.zip
Prepare for a new bootloader 7-pre4 release for iriver H100 series. Synced to work properly with SVN, and hopefully fixed remote detection problem and audio thump for some users. Also pure H100/H115 should be supported now. Actual bootloaders will be released separately.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16252 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/iriver_flash.c')
-rw-r--r--apps/plugins/iriver_flash.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/plugins/iriver_flash.c b/apps/plugins/iriver_flash.c
index f3fbbb45b8..6d776f4e29 100644
--- a/apps/plugins/iriver_flash.c
+++ b/apps/plugins/iriver_flash.c
@@ -27,7 +27,7 @@
unsigned char *audiobuf;
ssize_t audiobuf_size;
-#if defined(IRIVER_H120)
+#ifdef IRIVER_H100_SERIES
#define PLATFORM_ID ID_IRIVER_H100
#else
#undef PLATFORM_ID /* this platform is not (yet) flashable */
@@ -329,7 +329,7 @@ int load_firmware_file(const char *filename, uint32_t *checksum)
}
/* Verify the checksum */
- sum = 0;
+ sum = MODEL_NUMBER;
for (i = 0; i < len; i++)
sum += audiobuf[i];
@@ -344,7 +344,12 @@ int load_firmware_file(const char *filename, uint32_t *checksum)
unsigned long valid_bootloaders[][2] = {
/* Size-8 CRC32 */
+#ifdef IRIVER_H120 /* Iriver H120/H140 checksums */
{ 63788, 0x08ff01a9 }, /* 7-pre3, improved failsafe functions */
+ { 48764, 0xc674323e }, /* 7-pre4. Fixed audio thump & remote bootup */
+#endif
+#ifdef IRIVER_H100
+#endif
{ 0, 0 }
};
@@ -483,7 +488,7 @@ int flash_rockbox(const char *filename, int section)
p8 = (char *)get_section_address(section);
p8 += sizeof(struct flash_header);
- sum = 0;
+ sum = MODEL_NUMBER;
for (i = 0; i < len; i++)
sum += p8[i];
@@ -573,7 +578,7 @@ int flash_bootloader(const char *filename)
/* Verify */
p8 = (char *)BOOTLOADER_ENTRYPOINT;
- sum = 0;
+ sum = MODEL_NUMBER;
for (i = 0; i < len; i++)
sum += p8[i];