summaryrefslogtreecommitdiff
path: root/lib/Kconfig
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-09-26 04:43:18 +0300
committerTom Rini <trini@konsulko.com>2021-10-08 22:53:26 +0300
commit2c21256b27d70b5950bd059330cdab027fb6ab7e (patch)
tree3abd36e0fbbe9d61b897287395f3e8edc583150a /lib/Kconfig
parent603d15a572d5b1e2894db87b86d85a092dacdfd1 (diff)
downloadu-boot-2c21256b27d70b5950bd059330cdab027fb6ab7e.tar.xz
hash: Use Kconfig to enable hashing in host tools and SPL
At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it. Clean this up by adding new Kconfig options to enable hashing on the host, relying on CONFIG_IS_ENABLED() to deal with the different builds. Add new SPL Kconfigs for hardware-accelerated hashing, to maintain the current settings. This allows us to drop the image.h code and the I_WANT_MD5 hack. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'lib/Kconfig')
-rw-r--r--lib/Kconfig18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 7899e756f9..64765acfa6 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -438,6 +438,24 @@ config SPL_SHA384
The SHA384 algorithm produces a 384-bit (48-byte) hash value
(digest).
+config SPL_SHA_HW_ACCEL
+ bool "Enable hardware acceleration for SHA hash functions"
+ default y if SHA_HW_ACCEL
+ help
+ This option enables hardware acceleration for the SHA1 and SHA256
+ hashing algorithms. This affects the 'hash' command and also the
+ hash_lookup_algo() function.
+
+config SPL_SHA_PROG_HW_ACCEL
+ bool "Enable Progressive hashing support using hardware in SPL"
+ depends on SHA_PROG_HW_ACCEL
+ default y
+ help
+ This option enables hardware-acceleration for SHA progressive
+ hashing.
+ Data can be streamed in a block at a time and the hashing is
+ performed in hardware.
+
endif
if SHA_HW_ACCEL