[PATCH 4/5] image: Drop if/elseif hash selection in calculate_hash()
Tom Rini
trini at konsulko.com
Mon Aug 30 18:01:46 CEST 2021
On Mon, Aug 23, 2021 at 07:53:19PM -0500, Alexandru Gagniuc wrote:
> calculate_hash() would try to select the appropriate hashing function
> by a if/elseif contruct. But that is exactly why hash_lookup_algo()
> exists, so use it instead.
>
> This does mean that we now have to 'select HASH' to make sure we get
> the hash_lookup_algo() symbol. However, the change makes sense because
> even basic FITs will have to deal with "hash" nodes.
>
> My only concern is that the 'select SPL_HASH' might cause some
> platform to grow above its SPL size allowance
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Two problems. The easy to fix problem is that we need:
commit 7dbac59f6655e928d11708948f34e779b03bb3d2
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date: Mon Aug 23 19:53:19 2021 -0500
image: Drop if/elseif hash selection in calculate_hash()
calculate_hash() would try to select the appropriate hashing function
by a if/elseif contruct. But that is exactly why hash_lookup_algo()
exists, so use it instead.
This does mean that we now have to 'select HASH' to make sure we get
the hash_lookup_algo() symbol. However, the change makes sense because
even basic FITs will have to deal with "hash" nodes.
My only concern is that the 'select SPL_HASH' might cause some
platform to grow above its SPL size allowance
Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
[trini: Add SPL_CRYPTO to FSL_CAAM if ARM && SPL]
Signed-off-by: Tom Rini <trini at konsulko.com>
diff --git a/drivers/crypto/fsl/Kconfig b/drivers/crypto/fsl/Kconfig
index 1f5dfb94bb81..f91753aa0f3d 100644
--- a/drivers/crypto/fsl/Kconfig
+++ b/drivers/crypto/fsl/Kconfig
@@ -1,6 +1,7 @@
config FSL_CAAM
bool "Freescale Crypto Driver Support"
select SHA_HW_ACCEL
+ select SPL_CRYPTO if (ARM && SPL)
imply CMD_HASH
help
Enables the Freescale's Cryptographic Accelerator and Assurance
to fix a handful of platforms. The harder to fix problem is that
changing how the algorithm is selected seems to break mkimage on for
example xilinx_zynqmp_virt. Please fix and resubmit, and run it all
past CI as well. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210830/6e274e63/attachment.sig>
More information about the U-Boot
mailing list