mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
Roll crc32 into hash infrastructure
Add the CRC32 algorithm to the list of available hashes, and make the crc32 command use hash_command(). Add a new crc32_wd_buf() to make this possible, which puts its result in a buffer rather than returning it as a 32-bit value. Note: For some boards the hash command is not enabled, neither are sha1, sha256 or the verify option. In this case the full hash implementation adds about 500 bytes of overhead. So as a special case, we use #ifdef to select very simple bahaviour in that case. The justification for this is that it is currently a very common case (virtually all boards enable crc32 but only some enable more advanced features). Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d5b76673a5
commit
d20a40de9d
5 changed files with 115 additions and 114 deletions
|
@ -22,7 +22,7 @@
|
|||
#ifndef _HASH_H
|
||||
#define _HASH_H
|
||||
|
||||
#ifdef CONFIG_SHA1SUM_VERIFY
|
||||
#if defined(CONFIG_SHA1SUM_VERIFY) || defined(CONFIG_CRC32_VERIFY)
|
||||
#define CONFIG_HASH_VERIFY
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue