diff options
author | James Buren <braewoods+rb@braewoods.net> | 2021-06-21 09:36:54 +0000 |
---|---|---|
committer | James Buren <braewoods+rb@braewoods.net> | 2021-06-21 09:36:54 +0000 |
commit | 581081a3df072833ab22a58af574992820c2ae8f (patch) | |
tree | 741a88ef6978b85f62468146ffbcb948a4341139 /bootloader/main-pp.c | |
parent | fc9208108052440ccde79b6cd33e3598e8fb7c26 (diff) | |
download | rockbox-581081a3df072833ab22a58af574992820c2ae8f.tar.gz rockbox-581081a3df072833ab22a58af574992820c2ae8f.zip |
mi4: replace chksum_crc32 with crc_32r
This uses an equivalent algorithm but with a different initial value
than we normally use (all bits off vs all bits on). Use the new crc_32r
to replace the original MI4 crc32 implementation.
This frees up some extra space on mi4 targets which gives us more
room on a few very space constrained targets (sansa c200/e200, etc).
Change-Id: Iaaac3ae353b30566156b1404cbf31ca32926203d
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r-- | bootloader/main-pp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index ef766455b6..08b5ea3ef5 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "adc.h" | 37 | #include "adc.h" |
38 | #include "button.h" | 38 | #include "button.h" |
39 | #include "disk.h" | 39 | #include "disk.h" |
40 | #include "crc32-mi4.h" | 40 | #include "crc32.h" |
41 | #include "mi4-loader.h" | 41 | #include "mi4-loader.h" |
42 | #include "loader_strerror.h" | 42 | #include "loader_strerror.h" |
43 | #include <string.h> | 43 | #include <string.h> |
@@ -169,7 +169,7 @@ int load_mi4_part(unsigned char* buf, struct partinfo* pinfo, | |||
169 | (mi4header.mi4size-MI4_HEADER_SIZE)/512, buf); | 169 | (mi4header.mi4size-MI4_HEADER_SIZE)/512, buf); |
170 | 170 | ||
171 | /* Check CRC32 to see if we have a valid file */ | 171 | /* Check CRC32 to see if we have a valid file */ |
172 | sum = chksum_crc32 (buf,mi4header.mi4size-MI4_HEADER_SIZE); | 172 | sum = crc_32r (buf,mi4header.mi4size-MI4_HEADER_SIZE,0); |
173 | 173 | ||
174 | printf("Calculated CRC32: %x", sum); | 174 | printf("Calculated CRC32: %x", sum); |
175 | 175 | ||