From patchwork Fri Feb 11 10:56:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3522 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 75781C433EF for ; Fri, 11 Feb 2022 10:56:13 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.5827.1644576973020084783 for ; Fri, 11 Feb 2022 02:56:13 -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 7B1D71042 for ; Fri, 11 Feb 2022 02:56:12 -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 EF2A23F73B for ; Fri, 11 Feb 2022 02:56:11 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/5] CI: build perf via CORE_IMAGE_EXTRA_INSTALL Date: Fri, 11 Feb 2022 10:56:04 +0000 Message-Id: <20220211105608.2483647-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 ; Fri, 11 Feb 2022 10:56:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2981 Instead of adding perf to the target: list, add it to CORE_IMAGE_EXTRA_INSTALL. This means that machine configurations which need to change the target don't need to also build perf explicitly. Signed-off-by: Ross Burton --- ci/base.yml | 4 ++-- ci/gem5-arm64.yml | 1 - ci/qemu-generic-arm64.yml | 1 - ci/qemuarm64-secureboot.yml | 1 - ci/tc0.yml | 1 - ci/tc1.yml | 1 - 6 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ci/base.yml b/ci/base.yml index 795bd11f..6c2f8df1 100644 --- a/ci/base.yml +++ b/ci/base.yml @@ -40,9 +40,9 @@ local_conf_header: DISTRO_FEATURES:remove = "ptest" kvm: | QEMU_USE_KVM = "" - + perf: | + CORE_IMAGE_EXTRA_INSTALL += "perf" machine: unset target: - core-image-base - - perf diff --git a/ci/gem5-arm64.yml b/ci/gem5-arm64.yml index 8b8e66ba..90913f37 100644 --- a/ci/gem5-arm64.yml +++ b/ci/gem5-arm64.yml @@ -13,5 +13,4 @@ machine: gem5-arm64 target: - core-image-minimal - - perf - gem5-aarch64-native diff --git a/ci/qemu-generic-arm64.yml b/ci/qemu-generic-arm64.yml index 2b7b839c..87cbd2f8 100644 --- a/ci/qemu-generic-arm64.yml +++ b/ci/qemu-generic-arm64.yml @@ -11,5 +11,4 @@ machine: qemu-generic-arm64 target: - core-image-base - - perf - sbsa-acs diff --git a/ci/qemuarm64-secureboot.yml b/ci/qemuarm64-secureboot.yml index d06514d0..acc65303 100644 --- a/ci/qemuarm64-secureboot.yml +++ b/ci/qemuarm64-secureboot.yml @@ -12,7 +12,6 @@ local_conf_header: target: - core-image-base - - perf - optee-examples - optee-test - optee-spdevkit diff --git a/ci/tc0.yml b/ci/tc0.yml index dd94d874..b2f75d55 100644 --- a/ci/tc0.yml +++ b/ci/tc0.yml @@ -7,4 +7,3 @@ machine: tc0 target: - tc-artifacts-image - - perf diff --git a/ci/tc1.yml b/ci/tc1.yml index 987e5248..fd9acbd2 100644 --- a/ci/tc1.yml +++ b/ci/tc1.yml @@ -7,4 +7,3 @@ machine: tc1 target: - tc-artifacts-image - - perf From patchwork Fri Feb 11 10:56:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3523 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 8932AC433F5 for ; Fri, 11 Feb 2022 10:56:14 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.5828.1644576973738952426 for ; Fri, 11 Feb 2022 02:56:14 -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 578EA11D4 for ; Fri, 11 Feb 2022 02:56:13 -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 C7C963F73B for ; Fri, 11 Feb 2022 02:56:12 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/5] CI: improve coverage of corstone1000 Date: Fri, 11 Feb 2022 10:56:05 +0000 Message-Id: <20220211105608.2483647-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211105608.2483647-1-ross.burton@arm.com> References: <20220211105608.2483647-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 ; Fri, 11 Feb 2022 10:56:14 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2982 Consolidate the CS1K kas files into a common file, and respect the platform policy by setting the DISTRO to poky-tiny. Also add the CS1K-specific recipes psa-arch-tests and ffa-debugfs-mod to the build. Signed-off-by: Ross Burton --- ci/corstone1000-common.yml | 18 ++++++++++++++++++ ci/corstone1000-fvp.yml | 8 +------- ci/corstone1000-mps3.yml | 8 +------- 3 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 ci/corstone1000-common.yml diff --git a/ci/corstone1000-common.yml b/ci/corstone1000-common.yml new file mode 100644 index 00000000..f92e0f22 --- /dev/null +++ b/ci/corstone1000-common.yml @@ -0,0 +1,18 @@ +header: + version: 11 + includes: + - ci/base.yml + - ci/meta-openembedded.yml + +local_conf_header: + image: | + INITRAMFS_IMAGE_BUNDLE = "0" + INITRAMFS_IMAGE:remove = "corstone1000-initramfs-image" + CORE_IMAGE_EXTRA_INSTALL += "psa-arch-tests" + CORE_IMAGE_EXTRA_INSTALL += "optee-client" + CORE_IMAGE_EXTRA_INSTALL += "ffa-debugfs-mod" + +distro: poky-tiny + +target: + - core-image-minimal diff --git a/ci/corstone1000-fvp.yml b/ci/corstone1000-fvp.yml index 39a92b3c..e4659a3f 100644 --- a/ci/corstone1000-fvp.yml +++ b/ci/corstone1000-fvp.yml @@ -1,12 +1,6 @@ header: version: 11 includes: - - ci/base.yml - - ci/meta-openembedded.yml - -local_conf_header: - custom-local-conf: | - INITRAMFS_IMAGE_BUNDLE = "0" - INITRAMFS_IMAGE:remove = "corstone1000-initramfs-image" + - ci/corstone1000-common.yml machine: corstone1000-fvp diff --git a/ci/corstone1000-mps3.yml b/ci/corstone1000-mps3.yml index 21635938..2df7d976 100644 --- a/ci/corstone1000-mps3.yml +++ b/ci/corstone1000-mps3.yml @@ -1,12 +1,6 @@ header: version: 11 includes: - - ci/base.yml - - ci/meta-openembedded.yml - -local_conf_header: - custom-local-conf: | - INITRAMFS_IMAGE_BUNDLE = "0" - INITRAMFS_IMAGE:remove = "corstone1000-initramfs-image" + - ci/corstone1000-common.yml machine: corstone1000-mps3 From patchwork Fri Feb 11 10:56:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3524 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 7721FC433FE for ; Fri, 11 Feb 2022 10:56:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.5905.1644576974669233729 for ; Fri, 11 Feb 2022 02:56:14 -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 3839B1042 for ; Fri, 11 Feb 2022 02:56:14 -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 A76803F73B for ; Fri, 11 Feb 2022 02:56:13 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/5] arm/trusted-firmware-m: stop FetchContent from fetching Date: Fri, 11 Feb 2022 10:56:06 +0000 Message-Id: <20220211105608.2483647-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211105608.2483647-1-ross.burton@arm.com> References: <20220211105608.2483647-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 ; Fri, 11 Feb 2022 10:56:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2983 TF-M uses FetchContent to download further sources at configure time, but this is bad form as the sources and licenses are not tracked or archived. This should now be blocked by the network isolation but as this doesn't work in some environments (such as Docker containers) we can tell cmake to never fetch to be sure that all of the sources used are declared in SRC_URI. Signed-off-by: Ross Burton --- .../recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb index c0eee5cc..619162be 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb +++ b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb @@ -78,6 +78,9 @@ PACKAGECONFIG[cc-armclang] = "-DTFM_TOOLCHAIN_FILE=${S}/toolchain_ARMCLANG.cmake PACKAGECONFIG[test-secure] = "-DTEST_S=ON,-DTEST_S=OFF" PACKAGECONFIG[test-nonsecure] = "-DTEST_NS=ON,-DTEST_NS=OFF" +# Don't let FetchContent download more sources during do_configure +EXTRA_OECMAKE += "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" + # Add platform parameters EXTRA_OECMAKE += "-DTFM_PLATFORM=${TFM_PLATFORM}" From patchwork Fri Feb 11 10:56:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3525 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 87CC0C4332F for ; Fri, 11 Feb 2022 10:56:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.5831.1644576975497747034 for ; Fri, 11 Feb 2022 02:56:15 -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 15C6411D4 for ; Fri, 11 Feb 2022 02:56:15 -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 82F4D3F73B for ; Fri, 11 Feb 2022 02:56:14 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 4/5] arm-bsp/trusted-firmware-m: add OpenAMP to the CS1K build Date: Fri, 11 Feb 2022 10:56:07 +0000 Message-Id: <20220211105608.2483647-4-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211105608.2483647-1-ross.burton@arm.com> References: <20220211105608.2483647-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 ; Fri, 11 Feb 2022 10:56:16 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2984 TF-M for corstone1000 uses libmetal and open-amp, downloaded during configure by FetchContent. This is bad form, so add these sources and license statements to the recipe so the fetch doesn't need to happen. Signed-off-by: Ross Burton --- .../trusted-firmware-m-corstone1000.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc index 0e25fbe7..398d66eb 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc @@ -16,6 +16,20 @@ SRCREV_mcuboot = "29099e1d17f93ae1d09fe945ad191b703aacd3d8" PV = "1.5.0+git${SRCPV}" SRCREV_FORMAT = "tfm" +# libmetal +LICENSE += "& BSD-3-Clause" +LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c" +SRC_URI += "git://github.com/OpenAMP/libmetal.git;protocol=https;branch=main;name=libmetal;destsuffix=git/libmetal" +SRCREV_libmetal = "f252f0e007fbfb8b3a52b1d5901250ddac96baad" +EXTRA_OECMAKE += "-DLIBMETAL_SRC_PATH=${WORKDIR}/git/libmetal -DLIBMETAL_BIN_PATH=${B}/libmetal-build" + +# OpenAMP +LICENSE += "& BSD-2-Clause & BSD-3-Clause" +LIC_FILES_CHKSUM += "file://../openamp/LICENSE.md;md5=a8d8cf662ef6bf9936a1e1413585ecbf" +SRC_URI += "git://github.com/OpenAMP/open-amp.git;protocol=https;branch=main;name=openamp;destsuffix=git/openamp" +SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d" +EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${WORKDIR}/git/openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build" + # The install task signs the TF-A BL2 and FIP binaries. # So they need to be copied to the sysroot. Hence the dependencies below: do_prepare_recipe_sysroot[depends]+= "trusted-firmware-a:do_populate_sysroot" From patchwork Fri Feb 11 10:56:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 3526 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 76F2CC433F5 for ; Fri, 11 Feb 2022 10:56:17 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.5832.1644576976256334685 for ; Fri, 11 Feb 2022 02:56:16 -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 DED1C1042 for ; Fri, 11 Feb 2022 02:56:15 -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 616A93F73B for ; Fri, 11 Feb 2022 02:56:15 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 5/5] arm/secure-partitions: allow network operations during do_configure Date: Fri, 11 Feb 2022 10:56:08 +0000 Message-Id: <20220211105608.2483647-5-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211105608.2483647-1-ross.burton@arm.com> References: <20220211105608.2483647-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 ; Fri, 11 Feb 2022 10:56:17 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2985 trusted-services and psa-arch-tests both use FetchContent to download more source during configure, and they can't easily be seeded with the correct sources in advance (unlike TF-M). Until this is fixed upstream, allow network use during do_configure. Signed-off-by: Ross Burton --- .../recipes-security/trusted-services/secure-partitions.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-arm/recipes-security/trusted-services/secure-partitions.inc b/meta-arm/recipes-security/trusted-services/secure-partitions.inc index 2f56502e..1df7409c 100644 --- a/meta-arm/recipes-security/trusted-services/secure-partitions.inc +++ b/meta-arm/recipes-security/trusted-services/secure-partitions.inc @@ -20,3 +20,8 @@ SECURITY_LDFLAGS = "" TARGET_LDFLAGS = "-Wl,--build-id=none -Wl,--hash-style=both" do_configure[cleandirs] = "${B}" + +# Currently trusted-services and psa-arch-tests use FetchContent to download +# more sources during do_configure. Until this is resolved we need to allow +# network operations. +do_configure[network] = "1"