meta-arm.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm/hafnium: use sysroot libcrypto
@ 2021-07-27 16:00 Ross Burton
  0 siblings, 0 replies; only message in thread
From: Ross Burton @ 2021-07-27 16:00 UTC (permalink / raw)
  To: meta-arm

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>
---
 .../hafnium/hafnium/pkg-config-native.patch   | 29 +++++++++++++++++++
 meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb   |  5 ++--
 2 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch

diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch b/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch
new file mode 100644
index 0000000..2dcf35a
--- /dev/null
+++ b/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch
@@ -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)
+ 
diff --git a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb b/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
index 97e31e8..6d8bb3f 100644
--- a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
+++ b/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
@@ -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}"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-27 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27 16:00 [PATCH] arm/hafnium: use sysroot libcrypto Ross Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).