[PATCH] efi: Fix Kconfig dependency for EFI_TCG2_PROTOCOL
Michal Simek
michal.simek at xilinx.com
Thu Apr 1 13:13:59 CEST 2021
On 4/1/21 1:12 PM, Ilias Apalodimas wrote:
> 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?
All these dependencies should be listed. We are not running randconfig
to find these gaps but all of them should be listed. Just also found
that SHA512_ALGO should be enabled too.
Thanks,
Michal
More information about the U-Boot
mailing list