Skip to contentSkip to conversation

gnutls: Enable p11-kit by default

PATCH In review Fabio Estevam 2 participants 4 messages Jul 16 – Jul 17

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 gnutls: Enable p11-kit by default

From: Fabio Estevam <[email protected]>

U-Boot 2026.07 enables the mkeficapsule tool by default. During its build, mkeficapsule links against libgnutls and requires PKCS#11 symbols such as gnutls_pkcs11_init().

Commit e9f12f64279c ("gnutls: Add p11-kit for native builds") enabled p11-kit only for gnutls-native. However, this is not sufficient to build u-boot-tools, which still fails to link mkeficapsule with undefined references to the PKCS#11 API.

Enable p11-kit in the default PACKAGECONFIG so that the required symbols are available and u-boot-tools builds successfully.

---
 meta/recipes-support/gnutls/gnutls_3.8.13.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta/recipes-support/gnutls/gnutls_3.8.13.bb +1 -2
index 943864d4ba..ce9f2b16ff 100644
@@ -31,8 +31,7 @@ SRC_URI[sha256sum] = "ffed8ec1bf09c2426d4f14aae377de4753b53e537d685e604e99a8b16c
 
 inherit autotools texinfo pkgconfig gettext lib_package gtk-doc ptest
 
-PACKAGECONFIG ??= "libidn libtasn1 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
-PACKAGECONFIG:append:class-native = " p11-kit"
+PACKAGECONFIG ??= "libidn libtasn1 p11-kit ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
 
 # You must also have CONFIG_SECCOMP enabled in the kernel for
 # seccomp to work.
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/2 u-boot: upgrade 2026.04 -> 2026.07

From: Fabio Estevam <[email protected]>

Remove the local patch as it has been upstreamed.

---
 ...ripts-dtc-drop-yaml-in-DT-validation.patch | 85 -------------------
 meta/recipes-bsp/u-boot/u-boot-common.inc     |  2 +-
 .../u-boot/u-boot-tools_2026.04.bb            |  4 -
 .../u-boot/u-boot-tools_2026.07.bb            |  2 +
 .../{u-boot_2026.04.bb => u-boot_2026.07.bb}  |  2 -
 5 files changed, 3 insertions(+), 92 deletions(-)
 delete mode 100644 meta/recipes-bsp/u-boot/files/0001-scripts-dtc-drop-yaml-in-DT-validation.patch
 delete mode 100644 meta/recipes-bsp/u-boot/u-boot-tools_2026.04.bb
 create mode 100644 meta/recipes-bsp/u-boot/u-boot-tools_2026.07.bb
 rename meta/recipes-bsp/u-boot/{u-boot_2026.04.bb => u-boot_2026.07.bb} (93%)
meta/recipes-bsp/u-boot/files/0001-scripts-dtc-drop-yaml-in-DT-validation.patch deleted +0 -85
deleted file mode 100644
index 9c1adc8faf..0000000000
@@ -1,85 +0,0 @@
-From e77402000f978561ff2afe405aa9e5c9037a8717 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <[email protected]>
-Date: Wed, 29 Apr 2026 15:22:25 +0200
-Subject: [PATCH] scripts/dtc: drop yaml in DT validation
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The build issues found in dtc/yamltree were partially mitigated by a
-previous commit (807bcd844a: "scripts/dtc: Fix pkg-config behavior under
-sysroot"), but upstream dtc simply disabled yaml, and the same should be
-done here in order to permanently avoid those issues.
-
-Backport the change below from Linux v5.18 [1]:
-
-ef8795f3f1c ("dt-bindings: kbuild: Use DTB files for validation")
-
-I tested this patch with a couple Yocto builds: u-boot and u-boot-tools,
-using the current master branch (rev. "c53b0708f9"), having removed
-libyaml-native from u-boot-tools's dependencies.
-
-[1] https://git.kernel.org/linus/ef8795f3f1ce
-
-Signed-off-by: João Marcos Costa <[email protected]>
-
-Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/8ef8dee4f3a2b2021decfefd853dbd2a1632b77f]
----
- scripts/Makefile.lib             | 6 ------
- scripts/dtc/Makefile             | 8 --------
- scripts/dtc/update-dtc-source.sh | 2 +-
- 3 files changed, 1 insertion(+), 15 deletions(-)
-
-diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
-index b8969b7de54..d66f1ed13b1 100644
---- a/scripts/Makefile.lib
-+++ b/scripts/Makefile.lib
-@@ -86,12 +86,6 @@ base-dtb-y := $(foreach m, $(multi-dtb-y), $(firstword $(call suffix-search, $m,
- extra-y				+= $(dtb-y)
- extra-$(CONFIG_OF_ALL_DTBS)	+= $(dtb-)
- 
--# U-Boot specific
--ifneq ($(CHECK_DTBS),)
--extra-y += $(patsubst %.dtb,%.dt.yaml, $(dtb-y))
--extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtb,%.dt.yaml, $(dtb-))
--endif
--
- # Add subdir path
- 
- extra-y		:= $(addprefix $(obj)/,$(extra-y))
-diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile
-index 6f309b37e08..2ba8dba03be 100644
---- a/scripts/dtc/Makefile
-+++ b/scripts/dtc/Makefile
-@@ -17,15 +17,7 @@ fdtoverlay-objs	:= $(libfdt) fdtoverlay.o util.o
- # Source files need to get at the userspace version of libfdt_env.h to compile
- HOST_EXTRACFLAGS := -I$(srctree)/$(src)/libfdt
- 
--ifeq ($(wildcard $(PKG_CONFIG_SYSROOT_DIR)/usr/include/yaml.h),)
- HOST_EXTRACFLAGS += -DNO_YAML
--else
--dtc-objs	+= yamltree.o
--# To include <yaml.h> installed in a non-default path
--HOSTCFLAGS_yamltree.o := $(shell pkg-config --cflags yaml-0.1)
--# To link libyaml installed in a non-default path
--HOSTLDLIBS_dtc	:= $(shell pkg-config --libs yaml-0.1)
--endif
- 
- # Generated files need one more search path to include headers in source tree
- HOSTCFLAGS_dtc-lexer.lex.o := -I$(src)
-diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh
-index 32ff17ffd08..94627541533 100755
---- a/scripts/dtc/update-dtc-source.sh
-+++ b/scripts/dtc/update-dtc-source.sh
-@@ -32,7 +32,7 @@ DTC_UPSTREAM_PATH=`pwd`/../dtc
- DTC_LINUX_PATH=`pwd`/scripts/dtc
- 
- DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c \
--		srcpos.h treesource.c util.c util.h version_gen.h yamltree.c \
-+		srcpos.h treesource.c util.c util.h version_gen.h \
- 		dtc-lexer.l dtc-parser.y"
- LIBFDT_SOURCE="fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c \
- 		fdt_overlay.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c \
--- 
-2.47.0
-
meta/recipes-bsp/u-boot/u-boot-common.inc +1 -1
index 574768b9f8..229d779498 100644
@@ -12,7 +12,7 @@ PE = "1"
 
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "88dc2788777babfd6322fa655df549a019aa1e69"
+SRCREV = "ece349ade2973e220f524ce59e59711cc919263f"
 
 SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}"
 
meta/recipes-bsp/u-boot/u-boot-tools_2026.04.bb deleted +0 -4
deleted file mode 100644
index 6c3ef7efd1..0000000000
@@ -1,4 +0,0 @@
-require u-boot-common.inc
-require u-boot-tools.inc
-
-SRC_URI += "file://0001-scripts-dtc-drop-yaml-in-DT-validation.patch"
meta/recipes-bsp/u-boot/u-boot-tools_2026.07.bb new file +2 -0
new file mode 100644
index 0000000000..7eaf721ca8
@@ -0,0 +1,2 @@
+require u-boot-common.inc
+require u-boot-tools.inc
meta/recipes-bsp/u-boot/u-boot_2026.07.bb renamed from meta/recipes-bsp/u-boot/u-boot_2026.04.bb +0 -2
similarity index 93%
rename from meta/recipes-bsp/u-boot/u-boot_2026.04.bb
rename to meta/recipes-bsp/u-boot/u-boot_2026.07.bb
index b6345c8875..eed5127004 100644
@@ -3,8 +3,6 @@ require u-boot.inc
 
 DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native"
 
-SRC_URI += "file://0001-scripts-dtc-drop-yaml-in-DT-validation.patch"
-
 # workarounds for aarch64 kvm qemu boot regressions
 SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg"
 SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg"
Signature · 1 line
2.43.0
#2 lore raw
In reply to Fabio Estevam
Quoted 11 lines · Fabio Estevam via lists.openembedded.org

From: Fabio Estevam <[email protected]>

U-Boot 2026.07 enables the mkeficapsule tool by default. During its build, mkeficapsule links against libgnutls and requires PKCS#11 symbols such as gnutls_pkcs11_init().

Commit e9f12f64279c ("gnutls: Add p11-kit for native builds") enabled p11-kit only for gnutls-native. However, this is not sufficient to build u-boot-tools, which still fails to link mkeficapsule with undefined references to the PKCS#11 API.

Quoted 5 lines

Enable p11-kit in the default PACKAGECONFIG so that the required symbols are available and u-boot-tools builds successfully.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking the minidebuginfo.Minidebuginfo.test_minidebuginfo_qemu selftest, beacause of circular dependencies. It's possible the issue comes from the test itself:

2026-07-16 16:32:31,930 - oe-selftest - INFO - minidebuginfo.Minidebuginfo.test_minidebuginfo_qemu (subunit.RemotedTestCase)
2026-07-16 16:32:31,931 - oe-selftest - INFO -  ... FAIL

...
Initialising tasks...ERROR: 2129 unbuildable tasks were found.
These are usually caused by circular dependencies and any circular dependency chains found will be printed below. Increase the debug level to see a list of unbuildable tasks.

Identifying dependency loops (this may take a short while)...

ERROR:
Dependency loop #1 found:
Task /srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/recipes-core/systemd/systemd_261.bb:do_create_spdx (dependent Tasks ['systemd_261.bb:do_deploy_source_date_epoch', 'ninja_1.13.2.bb:do_create_spdx', 'meson_1.11.2.bb:do_create_spdx', 'patch_2.8.bb:do_populate_sysroot', 'shadow-sysroot_4.6.bb:do_create_spdx', 'glibc_2.43.bb:do_create_spdx', 'systemd_261.bb:do_unpack', 'gcc-runtime_16.1.bb:do_create_spdx', 'util-linux_2.42.2.bb:do_create_spdx', 'base-files_3.0.14.bb:do_create_spdx', 'shared-mime-info_2.5.1.bb:do_create_spdx', 'bash-completion_2.17.0.bb:do_create_spdx', 'systemd_261.bb:do_populate_sysroot', 'perl_5.42.2.bb:do_create_spdx', 'python3-jinja2_3.1.6.bb:do_create_spdx', 'gperf_3.3.bb:do_create_spdx', 'zstd_1.5.7.bb:do_create_spdx', 'gettext_1.0.bb:do_create_spdx', 'python3_3.14.6.bb:do_create_spdx', 'acl_2.4.0.bb:do_create_spdx', 'elfutils_0.195.bb:do_create_spdx', 'libxkbcommon_1.13.2.bb:do_create_spdx', 'systemd_261.bb:do_create_recipe_spdx', 'systemd_261.bb:do_patch', 'pkgconf_3.0.3.bb:do_create_spdx', 'kmod_34.2.bb:do_create_spdx', 'opkg-utils_0.7.0.bb:do_create_spdx', 'shadow_4.19.4.bb:do_create_spdx', 'shadow_4.19.4.bb:do_create_spdx', 'qemu-native_11.0.2.bb:do_create_spdx', 'libcap_2.78.bb:do_create_spdx', 'systemd_261.bb:do_packagedata', 'base-passwd_3.6.8.bb:do_create_spdx', 'gcc-cross_16.1.bb:do_create_spdx', 'libseccomp_2.6.0.bb:do_create_spdx', 'systemd_261.bb:do_package', 'quilt-native_0.69.bb:do_populate_sysroot']) Task /srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/recipes-support/p11-kit/p11-kit_0.26.4.bb:do_create_spdx (dependent Tasks ['ninja_1.13.2.bb:do_create_spdx', 'meson_1.11.2.bb:do_create_spdx', 'patch_2.8.bb:do_populate_sysroot', 'glibc_2.43.bb:do_create_spdx', 'p11-kit_0.26.4.bb:do_populate_sysroot', 'systemd_261.bb:do_create_spdx', 'bash-completion_2.17.0.bb:do_create_spdx', 'p11-kit_0.26.4.bb:do_packagedata', 'libffi_3.7.1.bb:do_create_spdx', 'p11-kit_0.26.4.bb:do_deploy_source_date_epoch', 'gettext_1.0.bb:do_create_spdx', 'python3_3.14.6.bb:do_create_spdx', 'gtk-doc_1.36.1.bb:do_create_spdx', 'p11-kit_0.26.4.bb:do_create_recipe_spdx', 'pkgconf_3.0.3.bb:do_create_spdx', 'libtasn1_4.21.0.bb:do_create_spdx', 'quilt-native_0.69.bb:do_populate_sysroot', 'p11-kit_0.26.4.bb:do_patch', 'p11-kit_0.26.4.bb:do_package', 'qemu-native_11.0.2.bb:do_create_spdx', 'p11-kit_0.26.4.bb:do_unpack', 'gcc-cross_16.1.bb:do_create_spdx', 'gcc-runtime_16.1.bb:do_create_spdx', 'libtasn1_4.21.0.bb:do_create_spdx'])
Task /srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/recipes-support/gnutls/gnutls_3.8.13.bb:do_create_spdx (dependent Tasks ['texinfo-dummy-native.bb:do_create_spdx', 'patch_2.8.bb:do_populate_sysroot', 'glibc_2.43.bb:do_create_spdx', 'gnutls_3.8.13.bb:do_patch', 'gnutls_3.8.13.bb:do_deploy_source_date_epoch', 'libunistring_1.4.2.bb:do_create_spdx', 'libtool-cross_2.5.4.bb:do_create_spdx', 'libidn2_2.3.8.bb:do_create_spdx', 'gnutls_3.8.13.bb:do_unpack', 'libtool-native_2.5.4.bb:do_create_spdx', 'gnutls_3.8.13.bb:do_package', 'gettext_1.0.bb:do_create_spdx', 'nettle_4.0.bb:do_create_spdx', 'gtk-doc_1.36.1.bb:do_create_spdx', 'gnutls_3.8.13.bb:do_packagedata', 'pkgconf_3.0.3.bb:do_create_spdx', 'p11-kit_0.26.4.bb:do_create_spdx', 'quilt-native_0.69.bb:do_populate_sysroot', 'gnutls_3.8.13.bb:do_populate_sysroot', 'gnutls_3.8.13.bb:do_create_recipe_spdx', 'gmp_6.3.0.bb:do_create_spdx', 'autoconf_2.73.bb:do_create_spdx', 'automake_1.18.1.bb:do_create_spdx', 'gcc-cross_16.1.bb:do_create_spdx', 'libseccomp_2.6.0.bb:do_create_spdx', 'gcc-runtime_16.1.bb:do_create_spdx', 'libtasn1_4.21.0.bb:do_create_spdx'])
Task /srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/recipes-support/libmicrohttpd/libmicrohttpd_1.0.6.bb:do_create_spdx (dependent Tasks ['patch_2.8.bb:do_populate_sysroot', 'curl_8.21.0.bb:do_create_spdx', 'glibc_2.43.bb:do_create_spdx', 'gnutls_3.8.13.bb:do_create_spdx', 'libmicrohttpd_1.0.6.bb:do_deploy_source_date_epoch', 'libtool-cross_2.5.4.bb:do_create_spdx', 'libmicrohttpd_1.0.6.bb:do_patch', 'libtool-native_2.5.4.bb:do_create_spdx', 'gettext_1.0.bb:do_create_spdx', 'libmicrohttpd_1.0.6.bb:do_package', 'file_5.48.bb:do_create_spdx', 'libmicrohttpd_1.0.6.bb:do_unpack', 'pkgconf_3.0.3.bb:do_create_spdx', 'libmicrohttpd_1.0.6.bb:do_packagedata', 'autoconf_2.73.bb:do_create_spdx', 'libgcrypt_1.12.2.bb:do_create_spdx', 'libmicrohttpd_1.0.6.bb:do_create_recipe_spdx', 'automake_1.18.1.bb:do_create_spdx', 'gcc-cross_16.1.bb:do_create_spdx', 'gcc-runtime_16.1.bb:do_create_spdx', 'quilt-native_0.69.bb:do_populate_sysroot', 'libmicrohttpd_1.0.6.bb:do_populate_sysroot'])
Task /srv/pokybuild/yocto-worker/oe-selftest-debian/build/layers/openembedded-core/meta/recipes-devtools/elfutils/elfutils_0.195.bb:do_create_spdx (dependent Tasks ['patch_2.8.bb:do_populate_sysroot', 'curl_8.21.0.bb:do_create_spdx', 'glibc_2.43.bb:do_create_spdx', 'elfutils_0.195.bb:do_packagedata', 'libtool-cross_2.5.4.bb:do_create_spdx', 'elfutils_0.195.bb:do_unpack', 'elfutils_0.195.bb:do_package', 'libtool-native_2.5.4.bb:do_create_spdx', 'xz_5.8.3.bb:do_create_spdx', 'elfutils_0.195.bb:do_populate_sysroot', 'elfutils_0.195.bb:do_create_recipe_spdx', 'gettext_1.0.bb:do_create_spdx', 'elfutils_0.195.bb:do_deploy_source_date_epoch', 'pkgconf_3.0.3.bb:do_create_spdx', 'libmicrohttpd_1.0.6.bb:do_create_spdx', 'elfutils_0.195.bb:do_patch', 'zlib_1.3.2.bb:do_create_spdx', 'autoconf_2.73.bb:do_create_spdx', 'sqlite3_3.53.3.bb:do_create_spdx', 'json-c_0.19.bb:do_create_spdx', 'automake_1.18.1.bb:do_create_spdx', 'gcc-cross_16.1.bb:do_create_spdx', 'libarchive_3.8.8.bb:do_create_spdx', 'gcc-runtime_16.1.bb:do_create_spdx', 'quilt-native_0.69.bb:do_populate_sysroot'])

https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/4112
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/4347
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/4293

I also note some failing ptests:

Failed ptests:
{'gnutls': ['pkcs11-cert-import-url-exts',

            'pkcs11-cert-import-url4-exts',
            'pkcs11-get-exts',
            'pkcs11-get-raw-issuer-exts',
            'pkcs11-import-url-privkey',
            'pkcs11-import-url-privkey-caps',
            'pkcs11-mechanisms',
            'pkcs11-obj-get-pk-algorithm',
            'pkcs11-obj-raw',
            'pkcs11-privkey-always-auth',
            'pkcs11-privkey-export',
            'pkcs11-privkey-fork',
            'pkcs11-privkey-fork-reinit',
            'pkcs11-privkey-pthread',
            'pkcs11-privkey-safenet-always-auth',
            'pkcs11-token-raw']}

https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/1930
https://autobuilder.yoctoproject.org/valkyrie/#/builders/61/builds/4028
https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4042

Can you have a look at the issues?

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

Hi Mathieu,

Quoted 4 lines · Mathieu Dubois-Briand

It looks like this is breaking the minidebuginfo.Minidebuginfo.test_minidebuginfo_qemu selftest, beacause of circular dependencies. It's possible the issue comes from the test itself:

I have sent v2 with a better fix.

Thanks