checksum calculation was wrong (must be the sum of unscrambled), thanks Jens


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5462 a1c6a512-1295-4272-9138-f99709370657
diff --git a/flash/extract/extract.c b/flash/extract/extract.c
index 31e223a..2a8a7b3 100644
--- a/flash/extract/extract.c
+++ b/flash/extract/extract.c
@@ -113,7 +113,12 @@
 
 	// generate checksum
 	for (i=0; i<uiSize; i++)
-		usChecksum += aImage[uiStart + i];
+	{
+		UINT8 byte;
+		byte = aImage[uiStart + i];
+		byte = ~((byte >> 1) | ((byte << 7) & 0x80)); /* poor man's ROR */
+		usChecksum += byte;
+	}
 
 	// make header
 	Write32(aHeader + 2, usChecksum); // checksum in 5th and 6th byte