On 9/27/21 11:06 AM, Simon Glass wrote:
Hi Alex,
On Mon, 27 Sept 2021 at 09:53, Alex G. <mr.nuke...@gmail.com> wrote:
Hi Simon
On 9/25/21 8:43 PM, Simon Glass wrote:
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 <s...@chromium.org>
---
Changes in v5:
- Drop I_WANT_MD5
- Use TOOLS_ instead of HOST_
I was planning to move hash algos to a linker list for target code, and
a simple, ifdef-free list for the host, like we've done for crypto
algos, and I think padding algos.
We'd be able to drop #define I_WANT_MD5 (which is temporary), and drop
define CONFIG_SHA_*, and by extension, drop the need for
CONFIG_TOOLS_SHA*. I think that's far more elegant.
OK but can we do that after my series goes in? The series is a
significant #ifdef clean-up and I think you can easily do that on top
of the series.
Of course!
Alex