* [Buildroot] [PATCH 1/1] package/uboot-tools: select p11-kit when building target mkeficapsule
@ 2026-08-09 11:11 Fiona Klute via buildroot
2026-08-09 15:35 ` Julien Olivain via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Klute via buildroot @ 2026-08-09 11:11 UTC (permalink / raw)
To: buildroot; +Cc: Vincent Stehlé, Fiona Klute
Since upstream commit 0c716a157be460006a4b762625de329b5e36dbf9 (first
release: v2026.07) mkeficapsule supports PKCS#11 keys, and in turn
requires GnuTLS with PKCS#11 support.
Without it, building mkeficapsule for the target fails:
HOSTLD tools/mkeficapsule
/home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: tools/mkeficapsule.o: in function `main':
mkeficapsule.c:(.text.startup+0x530): undefined reference to `gnutls_pkcs11_init'
/home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: mkeficapsule.c:(.text.startup+0x544): undefined reference to `gnutls_pkcs11_add_provider'
/home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: mkeficapsule.c:(.text.startup+0x5fc): undefined reference to `gnutls_pkcs11_obj_list_import_url4'
/home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: mkeficapsule.c:(.text.startup+0x620): undefined reference to `gnutls_x509_crt_import_pkcs11'
/home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: mkeficapsule.c:(.text.startup+0x1334): undefined reference to `gnutls_pkcs11_deinit'
collect2: error: ld returned 1 exit status
The error can be reproduced using "utils/test-pkg -c" with the
following config:
BR2_PACKAGE_UBOOT_TOOLS=y
BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE=y
For host-uboot-tools this was solved in Buildroot commit
6597563da7bb359eac57c8fb70e4efc3d6ef4c02 "package/gnutls: add host
support for pkcs11" by unconditionally enabling PKCS#11 support for
host-gnutls. For the target a more fine-grained approach is desirable,
so instead select BR2_PACKAGE_P11_KIT if
BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE=y and propagate dependencies.
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
---
package/uboot-tools/Config.in | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in
index da6cd65252..b7fd6ff17d 100644
--- a/package/uboot-tools/Config.in
+++ b/package/uboot-tools/Config.in
@@ -68,17 +68,22 @@ config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE
config BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE
bool "mkeficapsule"
- depends on !BR2_STATIC_LIBS # gnutls
+ depends on !BR2_STATIC_LIBS # gnutls, p11-kit
+ depends on BR2_TOOLCHAIN_HAS_THREADS # p11-kit
+ depends on BR2_USE_MMU # p11-kit
depends on BR2_USE_WCHAR # gnutls
select BR2_PACKAGE_GNUTLS
+ select BR2_PACKAGE_P11_KIT
help
Install the mkeficapsule tool on the target system
The mkeficapsule tool from Das U-Boot bootloader, which allows
generation of UEFI capsule binaries.
-comment "mkeficapsule support needs a toolchain w/ wchar, dynamic library"
- depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS
+comment "mkeficapsule support needs a toolchain w/ wchar, threads, dynamic library"
+ depends on BR2_USE_MMU
+ depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS \
+ || BR2_STATIC_LIBS
config BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE
bool "mkenvimage"
--
2.55.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/uboot-tools: select p11-kit when building target mkeficapsule
2026-08-09 11:11 [Buildroot] [PATCH 1/1] package/uboot-tools: select p11-kit when building target mkeficapsule Fiona Klute via buildroot
@ 2026-08-09 15:35 ` Julien Olivain via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Julien Olivain via buildroot @ 2026-08-09 15:35 UTC (permalink / raw)
To: Fiona Klute; +Cc: buildroot, Vincent Stehlé
On 09/08/2026 13:11, Fiona Klute via buildroot wrote:
> Since upstream commit 0c716a157be460006a4b762625de329b5e36dbf9 (first
> release: v2026.07) mkeficapsule supports PKCS#11 keys, and in turn
> requires GnuTLS with PKCS#11 support.
>
> Without it, building mkeficapsule for the target fails:
>
> HOSTLD tools/mkeficapsule
> /home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
> tools/mkeficapsule.o: in function `main':
> mkeficapsule.c:(.text.startup+0x530): undefined reference to
> `gnutls_pkcs11_init'
> /home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
> mkeficapsule.c:(.text.startup+0x544): undefined reference to
> `gnutls_pkcs11_add_provider'
> /home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
> mkeficapsule.c:(.text.startup+0x5fc): undefined reference to
> `gnutls_pkcs11_obj_list_import_url4'
> /home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
> mkeficapsule.c:(.text.startup+0x620): undefined reference to
> `gnutls_x509_crt_import_pkcs11'
> /home/fiona/br-test-pkg/bootlin-armv5-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/14.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld:
> mkeficapsule.c:(.text.startup+0x1334): undefined reference to
> `gnutls_pkcs11_deinit'
> collect2: error: ld returned 1 exit status
>
> The error can be reproduced using "utils/test-pkg -c" with the
> following config:
>
> BR2_PACKAGE_UBOOT_TOOLS=y
> BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE=y
>
> For host-uboot-tools this was solved in Buildroot commit
> 6597563da7bb359eac57c8fb70e4efc3d6ef4c02 "package/gnutls: add host
> support for pkcs11" by unconditionally enabling PKCS#11 support for
> host-gnutls. For the target a more fine-grained approach is desirable,
> so instead select BR2_PACKAGE_P11_KIT if
> BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE=y and propagate dependencies.
>
> Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-09 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-09 11:11 [Buildroot] [PATCH 1/1] package/uboot-tools: select p11-kit when building target mkeficapsule Fiona Klute via buildroot
2026-08-09 15:35 ` Julien Olivain via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox