1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-08 17:19:39 +00:00

arm/hafnium: use sysroot libcrypto

Hafnium's build of the kernel needs libssl-dev to be installed on the host.

Instead, DEPEND on openssl-native and patch the lookup to use pkg-config-native.

Change-Id: Id184865183cde487cacd73740a916166c2900a66
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2021-07-27 17:00:46 +01:00
committed by Jon Mason
parent 3f9d822025
commit 2e4114a869
2 changed files with 32 additions and 2 deletions
@@ -0,0 +1,29 @@
Use pkg-config-native to find the libssl headers. The bulk of this patch is
actually a backport from mainline Linux, but pkg-config changed to
pkg-config-native.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@arm.com>
diff --git a/scripts/Makefile b/scripts/Makefile
index 9adb6d247818..5fe371c7d7f5 100644
--- a/third_party/linux/scripts/Makefile
+++ b/third_party/linux/scripts/Makefile
@@ -21,10 +21,15 @@ hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
+CRYPTO_CFLAGS = $(shell pkg-config-native --cflags libcrypto)
+CRYPTO_LIBS = $(shell pkg-config-native --libs libcrypto)
+
HOSTCFLAGS_sortextable.o = -I$(srctree)/tools/include
HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
-HOSTLDLIBS_sign-file = -lcrypto
-HOSTLDLIBS_extract-cert = -lcrypto
+HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
+HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)
+HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
+HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
always := $(hostprogs-y) $(hostprogs-m)
+3 -2
View File
@@ -7,7 +7,8 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit deploy python3native
SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https"
SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https \
file://pkg-config-native.patch"
SRCREV = "3a149eb219467c0d9336467ea1fb9d3fb65da94b"
S = "${WORKDIR}/git"
@@ -27,7 +28,7 @@ HAFNIUM_BUILD_DIR_PLAT = "out/${HAFNIUM_PROJECT}/${HAFNIUM_PLATFORM}_clang"
# default to hafnium
HAFNIUM_INSTALL_TARGET ?= "hafnium"
DEPENDS = "bison-native bc-native"
DEPENDS = "bison-native bc-native openssl-native"
# set project to build
EXTRA_OEMAKE += "PROJECT=${HAFNIUM_PROJECT}"