package/gnutls: add host support for pkcs11

Future U-Boot 2026.07 will build mkeficapsule with pkcs11 support. [1]

This causes link errors with Buildroot, such as the following one:

   mkeficapsule.c:(.text.startup+0xcd3): undefined reference to `gnutls_pkcs11_init'

(Other symbols the linker complains about are: gnutls_pkcs11_add_provider,
gnutls_pkcs11_obj_list_import_url4, gnutls_x509_crt_import_pkcs11 and
gnutls_pkcs11_deinit.)

The following example commands can be used to reproduce the issue:

     make qemu_aarch64_ebbr_defconfig
     echo 'BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2026.07-rc3"' >>.config
     echo 'BR2_TARGET_UBOOT_NEEDS_GNUTLS=y' >>.config
     echo '# BR2_DOWNLOAD_FORCE_CHECK_HASHES is not set' >>.config
     make olddefconfig
     make uboot

This commit adds the pkcs11 support for host-gnutls.

In Buildroot, since host-gnutls is currently only needed by uboot
(and other uboot derivatives such as uboot-tools) the pkcs11 support
is added unconditionally to host-gnutls.

Link: 0c716a157b [1]
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
This commit is contained in:
Vincent Stehlé
2026-06-05 11:43:07 +02:00
committed by Fiona Klute
parent 57795860f5
commit 6597563da7

View File

@@ -43,7 +43,8 @@ GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \
gl_cv_func_gettimeofday_clobber=no gl_cv_func_gettimeofday_clobber=no
GNUTLS_INSTALL_STAGING = YES GNUTLS_INSTALL_STAGING = YES
HOST_GNUTLS_DEPENDENCIES = host-pkgconf host-libtasn1 host-libunistring host-nettle HOST_GNUTLS_DEPENDENCIES = host-pkgconf host-libtasn1 host-libunistring \
host-nettle host-p11-kit
HOST_GNUTLS_CONF_OPTS = \ HOST_GNUTLS_CONF_OPTS = \
--disable-doc \ --disable-doc \
--disable-libdane \ --disable-libdane \
@@ -64,7 +65,7 @@ HOST_GNUTLS_CONF_OPTS = \
--disable-openssl-compatibility \ --disable-openssl-compatibility \
--without-brotli \ --without-brotli \
--without-idn \ --without-idn \
--without-p11-kit \ --with-p11-kit \
--without-zlib \ --without-zlib \
--without-zstd --without-zstd