From patchwork Mon Nov 29 14:24:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68616C433EF for ; Mon, 29 Nov 2021 14:24:40 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.61399.1638195878713636629 for ; Mon, 29 Nov 2021 06:24:39 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4D77A1042 for ; Mon, 29 Nov 2021 06:24:38 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED43B3F766 for ; Mon, 29 Nov 2021 06:24:37 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/3] arm/hafnium: upgrade to 2.6 Date: Mon, 29 Nov 2021 14:24:31 +0000 Message-Id: <20211129142433.4019092-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 29 Nov 2021 14:24:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2475 hashbang.patch isn't needed anymore, and rebase the other patches. Signed-off-by: Ross Burton --- .../hafnium/hafnium/hashbang.patch | 34 ------------------ .../recipes-bsp/hafnium/hafnium/host-ld.patch | 8 ++--- .../hafnium/hafnium/pkg-config-native.patch | 35 +++++++------------ .../{hafnium_2.5.bb => hafnium_2.6.bb} | 3 +- 4 files changed, 18 insertions(+), 62 deletions(-) delete mode 100644 meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch rename meta-arm/recipes-bsp/hafnium/{hafnium_2.5.bb => hafnium_2.6.bb} (95%) diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch b/meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch deleted file mode 100644 index af77e7c7..00000000 --- a/meta-arm/recipes-bsp/hafnium/hafnium/hashbang.patch +++ /dev/null @@ -1,34 +0,0 @@ -Update Clang hashbangs to call python3 instead of python, as that doesn't exist -in our hosttools. - -Upstream-Status: Backport [partial, fixed upstream] -Signed-off-by: Ross Burton - -diff --git a/linux-x64/clang/bin/clang b/prebuilts/linux-x64/clang/bin/clang -index 081cb20a..ce9cc267 100755 ---- a/prebuilts/linux-x64/clang/bin/clang -+++ b/prebuilts/linux-x64/clang/bin/clang -@@ -1 +1 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 -diff --git a/prebuilts/linux-x64/clang/bin/clang++ b/prebuilts/linux-x64/clang/bin/clang++ -index 081cb20a..ce9cc267 100755 ---- a/prebuilts/linux-x64/clang/bin/clang++ -+++ b/prebuilts/linux-x64/clang/bin/clang++ -@@ -1 +1 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 -diff --git a/prebuilts/linux-x64/clang/bin/clang-tidy b/prebuilts/linux-x64/clang/bin/clang-tidy -index 081cb20a..ce9cc267 100755 ---- a/prebuilts/linux-x64/clang/bin/clang-tidy -+++ b/prebuilts/linux-x64/clang/bin/clang-tidy -@@ -1 +1 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 -diff --git a/prebuilts/linux-x64/clang/bin/scan-view b/prebuilts/linux-x64/clang/bin/scan-view -index 6165432e..07effbca 100755 ---- a/prebuilts/linux-x64/clang/bin/scan-view -+++ b/prebuilts/linux-x64/clang/bin/scan-view -@@ -1 +1 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch b/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch index 8e7fee25..040d61b2 100644 --- a/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch +++ b/meta-arm/recipes-bsp/hafnium/hafnium/host-ld.patch @@ -11,11 +11,11 @@ diff --git a/build/linux/linux.gni b/build/linux/linux.gni index 65cc9df..19adbfb 100644 --- a/build/linux/linux.gni +++ b/build/linux/linux.gni -@@ -69,6 +70,7 @@ template("linux_kernel") { - "GCC_TOOLCHAIN_DIR=" + rebase_path("//prebuilts/linux-x64/gcc/bin"), - "ARCH=arm64", +@@ -60,6 +60,7 @@ template("linux_kernel") { + "LLVM=1", + "LLVM_IAS=1", "CROSS_COMPILE=aarch64-linux-gnu-", + "HOSTLDFLAGS=" + getenv("BUILD_LDFLAGS"), - + # Build out-of-tree in `target_out_dir`. "O=" + rebase_path(target_out_dir), diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch b/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch index 2dcf35aa..bc031956 100644 --- a/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch +++ b/meta-arm/recipes-bsp/hafnium/hafnium/pkg-config-native.patch @@ -1,29 +1,20 @@ -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. +Use pkg-config-native to find the libssl headers. Upstream-Status: Inappropriate Signed-off-by: Ross Burton diff --git a/scripts/Makefile b/scripts/Makefile -index 9adb6d247818..5fe371c7d7f5 100644 +index b4b7d8b58..26a5160ee 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) - +@@ -10,8 +10,8 @@ + + HOST_EXTRACFLAGS += -I$(srctree)/tools/include + +-CRYPTO_LIBS = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto) +-CRYPTO_CFLAGS = $(shell pkg-config --cflags libcrypto 2> /dev/null) ++CRYPTO_LIBS = $(shell pkg-config-native --libs libcrypto 2> /dev/null || echo -lcrypto) ++CRYPTO_CFLAGS = $(shell pkg-config-native --cflags libcrypto 2> /dev/null) + + hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c + hostprogs-$(CONFIG_KALLSYMS) += kallsyms diff --git a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb b/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb similarity index 95% rename from meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb rename to meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb index ad00f290..b9dc63bc 100644 --- a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb +++ b/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb @@ -10,11 +10,10 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy python3native pkgconfig SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https;branch=master \ - file://hashbang.patch \ file://host-ld.patch \ file://pkg-config-native.patch \ file://native-dtc.patch" -SRCREV = "3a149eb219467c0d9336467ea1fb9d3fb65da94b" +SRCREV = "55b74f893948dd08d2782dd8fa9e903c143a6704" S = "${WORKDIR}/git" B = "${WORKDIR}/build" From patchwork Mon Nov 29 14:24:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 558A8C433F5 for ; Mon, 29 Nov 2021 14:24:40 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.61058.1638195879239174205 for ; Mon, 29 Nov 2021 06:24:39 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D3C45113E for ; Mon, 29 Nov 2021 06:24:38 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7FA4F3F766 for ; Mon, 29 Nov 2021 06:24:38 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/3] arm/hafnium: enable qemuarm64 Date: Mon, 29 Nov 2021 14:24:32 +0000 Message-Id: <20211129142433.4019092-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211129142433.4019092-1-ross.burton@arm.com> References: <20211129142433.4019092-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 29 Nov 2021 14:24:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2476 Hafnium can do a qemu/aarch64 build, so enable that for future testing purposes. Signed-off-by: Ross Burton --- meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb b/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb index b9dc63bc..0452272e 100644 --- a/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb +++ b/meta-arm/recipes-bsp/hafnium/hafnium_2.6.bb @@ -18,12 +18,14 @@ S = "${WORKDIR}/git" B = "${WORKDIR}/build" COMPATIBLE_MACHINE ?= "invalid" +COMPATIBLE_MACHINE:qemuarm64 = "qemuarm64" # Default build 'reference' HAFNIUM_PROJECT ?= "reference" # Platform must be set for each machine HAFNIUM_PLATFORM ?= "invalid" +HAFNIUM_PLATFORM:qemuarm64 = "qemu_aarch64" # do_deploy will install everything listed in this variable. It is set by # default to hafnium From patchwork Mon Nov 29 14:24:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 558DCC433FE for ; Mon, 29 Nov 2021 14:24:40 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.61400.1638195879737177548 for ; Mon, 29 Nov 2021 06:24:39 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 663391042 for ; Mon, 29 Nov 2021 06:24:39 -0800 (PST) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 11EBB3F766 for ; Mon, 29 Nov 2021 06:24:38 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/3] arm-bsp/hafnium: update bbappend for 2.6 Date: Mon, 29 Nov 2021 14:24:33 +0000 Message-Id: <20211129142433.4019092-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211129142433.4019092-1-ross.burton@arm.com> References: <20211129142433.4019092-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 29 Nov 2021 14:24:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2477 No need for this to be versioned as it complicates upgrades. Remove the explicit post-2.5 SRCREV now that the recipe has upgraded to 2.6, and remove assignments which are already the default for conciseness. Signed-off-by: Ross Burton --- meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc | 4 ---- .../hafnium/{hafnium_2.5.bbappend => hafnium_%.bbappend} | 0 2 files changed, 4 deletions(-) rename meta-arm-bsp/recipes-bsp/hafnium/{hafnium_2.5.bbappend => hafnium_%.bbappend} (100%) diff --git a/meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc b/meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc index 284443ca..8eb6b4c4 100644 --- a/meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc +++ b/meta-arm-bsp/recipes-bsp/hafnium/hafnium-tc.inc @@ -1,8 +1,4 @@ # TC0 specific configuration COMPATIBLE_MACHINE = "(tc?)" -HAFNIUM_PROJECT = "reference" -HAFNIUM_INSTALL_TARGET = "hafnium" HAFNIUM_PLATFORM = "secure_tc" - -SRCREV = "464fa5a287791e7d128e37721a7d1da257144e12" diff --git a/meta-arm-bsp/recipes-bsp/hafnium/hafnium_2.5.bbappend b/meta-arm-bsp/recipes-bsp/hafnium/hafnium_%.bbappend similarity index 100% rename from meta-arm-bsp/recipes-bsp/hafnium/hafnium_2.5.bbappend rename to meta-arm-bsp/recipes-bsp/hafnium/hafnium_%.bbappend