[PATCH] efi: Fix Kconfig dependency for EFI_TCG2_PROTOCOL

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Apr 1 13:12:21 CEST 2021


On Thu, Apr 01, 2021 at 12:45:33PM +0200, Michal Simek wrote:
> When EFI_TCG2_PROTOCOL is selected there is unwritten dependency on sha384
> and sha512.
> 
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
> 
> /opt/Xilinx/Vitis/2020.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.bfd.real: lib/built-in.o: in function `tcg2_create_digest':
> /mnt/disk/u-boot/lib/efi_loader/efi_tcg2.c:546: undefined reference to `sha384_starts'
> /opt/Xilinx/Vitis/2020.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.bfd.real: /mnt/disk/u-boot/lib/efi_loader/efi_tcg2.c:547: undefined reference to `sha384_update'
> /opt/Xilinx/Vitis/2020.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.bfd.real: /mnt/disk/u-boot/lib/efi_loader/efi_tcg2.c:548: undefined reference to `sha384_finish'
> /opt/Xilinx/Vitis/2020.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.bfd.real: /mnt/disk/u-boot/lib/efi_loader/efi_tcg2.c:552: undefined reference to `sha512_starts'
> /opt/Xilinx/Vitis/2020.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.bfd.real: /mnt/disk/u-boot/lib/efi_loader/efi_tcg2.c:553: undefined reference to `sha512_update'
> /opt/Xilinx/Vitis/2020.2/gnu/aarch64/lin/aarch64-linux/bin/../x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-ld.bfd.real: /mnt/disk/u-boot/lib/efi_loader/efi_tcg2.c:554: undefined reference to `sha512_finish'
> 
> ---
>  lib/efi_loader/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
> index e44f004f3f8d..2b522c9151ad 100644
> --- a/lib/efi_loader/Kconfig
> +++ b/lib/efi_loader/Kconfig
> @@ -300,6 +300,8 @@ config EFI_RNG_PROTOCOL
>  config EFI_TCG2_PROTOCOL
>  	bool "EFI_TCG2_PROTOCOL support"
>  	depends on TPM_V2
> +	select SHA512
> +	select SHA384
>  	help
>  	  Provide a EFI_TCG2_PROTOCOL implementation using the TPM hardware
>  	  of the platform.
> -- 
> 2.31.0
> 


There's also SHA1 and SHA256 in that code. Are those included by default or we
should explicitly add them as well?

Thanks
/Ilias


More information about the U-Boot mailing list