summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2014-07-01 09:16:03 +0200
committerMarcin Bukat <marcin.bukat@gmail.com>2014-07-01 09:16:03 +0200
commit314516e228421787b9ea3d0336ff99234ea511af (patch)
tree93e49ca5251d0977197b8b5f585b5c0e96a2cf36 /firmware
parentc9816f57bf8782fd2ce6487aa0dc0f739145b631 (diff)
rolo: fix crc calculation for mi4
crc32gentab() which initilizes crc table was called in bootloader but not in main binary. Fix this temporary by always calling it in load_mi4(). The proper fix probably to switch to const table and drop runtime initialization. Change-Id: I8b0c2c791642f56ed56189d156647661935a815d
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/pp/mi4-loader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/target/arm/pp/mi4-loader.c b/firmware/target/arm/pp/mi4-loader.c
index c465b898b4..c0031ea2f0 100644
--- a/firmware/target/arm/pp/mi4-loader.c
+++ b/firmware/target/arm/pp/mi4-loader.c
@@ -207,6 +207,8 @@ int load_mi4(unsigned char* buf,
return EREAD_IMAGE_FAILED;
/* Check CRC32 to see if we have a valid file */
+ chksum_crc32gentab();
+
sum = chksum_crc32 (buf, mi4header.mi4size - MI4_HEADER_SIZE);
if(sum != mi4header.crc32)