From fede80de4ce8c1f94b9cb901f11eb18cc8821a6d Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 9 Sep 2026 19:03:40 +0100 Subject: [PATCH] arm/trusted-firmware-a: enable OpenSSL stub engine API The cert_create tool uses the OpenSSL engine API, which has been removed from OpenSSL 4. Enable the engine stubs to fix the build until this is resolved upstream. Also shoe-horn BUILD_CFLAGS into cert_create/Makefile, so the define is passed to the build. Signed-off-by: Ross Burton Signed-off-by: Jon Mason --- .../recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc index 1e06559c..9a2b741f 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc @@ -93,6 +93,10 @@ def remove_options_tail (in_string): from itertools import takewhile return ' '.join(takewhile(lambda x: not x.startswith('-'), in_string.split(' '))) +# tools/cert_create/src/key.c uses the OpenSSL engine API, but this has been removed +# from OpenSSL 4. Enable the compatibility stub APIs until upstream is fixed. +BUILD_CFLAGS += "-DOPENSSL_ENGINE_STUBS" + EXTRA_OEMAKE += "${@'' if d.getVar('TFA_LTO') else "'LD=" + remove_options_tail(d.getVar('LD')) + "'"}" EXTRA_OEMAKE += "CC='${@remove_options_tail(d.getVar('CC'))}'" @@ -158,6 +162,7 @@ do_compile() { sed -i '/^LDOPTS/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/fiptool/Makefile sed -i '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' ${S}/tools/fiptool/Makefile sed -i '/^LIB/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/cert_create/Makefile + sed -i '/^INC_DIR / s,$, \$\{BUILD_CFLAGS},' ${S}/tools/cert_create/Makefile # Currently there are races if you build all the targets at once in parallel for T in ${TFA_BUILD_TARGET}; do