From patchwork Wed Dec 15 11:13:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1530 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 E7272C4332F for ; Wed, 15 Dec 2021 11:13:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.38936.1639566795138633822 for ; Wed, 15 Dec 2021 03:13: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 E42DFD6E for ; Wed, 15 Dec 2021 03:13: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 8FF783F774 for ; Wed, 15 Dec 2021 03:13:13 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/4] arm/trusted-firmware-m: remove stale patch Date: Wed, 15 Dec 2021 11:13:08 +0000 Message-Id: <20211215111311.3066077-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 ; Wed, 15 Dec 2021 11:13:16 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2716 This patch should have been removed as part of the 1.2.0 upgrade. Signed-off-by: Ross Burton --- .../trusted-firmware-m/files/objcopy.patch | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 meta-arm/recipes-bsp/trusted-firmware-m/files/objcopy.patch diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/files/objcopy.patch b/meta-arm/recipes-bsp/trusted-firmware-m/files/objcopy.patch deleted file mode 100644 index 5734c13a..00000000 --- a/meta-arm/recipes-bsp/trusted-firmware-m/files/objcopy.patch +++ /dev/null @@ -1,20 +0,0 @@ -The BFD target elf32-little has no specified machine, which trips the -architecture sanity test. Use elf32-littlearm to set the machine -correctly. - -Upstream-Status: Backport -Signed-off-by: Ross Burton - -diff --git a/cmake/Common/CompilerGNUARMCommon.cmake b/cmake/Common/CompilerGNUARMCommon.cmake -index 32e805bb..2d3ea8e4 100644 ---- a/cmake/Common/CompilerGNUARMCommon.cmake -+++ b/cmake/Common/CompilerGNUARMCommon.cmake -@@ -196,7 +196,7 @@ function(compiler_generate_hex_output TARGET) - endfunction() - - function(compiler_generate_elf_output TARGET) -- add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_GNUARM_OBJCOPY} ARGS -O elf32-little $ $/${TARGET}.elf) -+ add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_GNUARM_OBJCOPY} ARGS -O elf32-littlearm $ $/${TARGET}.elf) - endfunction() - - # Function for creating a new target that preprocesses a .c file From patchwork Wed Dec 15 11:13:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1528 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 B8353C433F5 for ; Wed, 15 Dec 2021 11:13:15 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.39146.1639566795134028969 for ; Wed, 15 Dec 2021 03:13: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 767ADED1 for ; Wed, 15 Dec 2021 03:13: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 2259C3F774 for ; Wed, 15 Dec 2021 03:13:14 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/4] arm/trusted-firmware-m: upgrade to 1.5.0 Date: Wed, 15 Dec 2021 11:13:09 +0000 Message-Id: <20211215111311.3066077-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215111311.3066077-1-ross.burton@arm.com> References: <20211215111311.3066077-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 ; Wed, 15 Dec 2021 11:13:15 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2715 Update tfm-tests and mcuboot SHAs. mbedtls is still recommended to be at 3.0.0, newer releases do not build. Signed-off-by: Ross Burton --- ...re-m_1.4.1.bb => trusted-firmware-m_1.5.0.bb} | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename meta-arm/recipes-bsp/trusted-firmware-m/{trusted-firmware-m_1.4.1.bb => trusted-firmware-m_1.5.0.bb} (93%) diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4.1.bb b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb similarity index 93% rename from meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4.1.bb rename to meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb index 77199369..8e795deb 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4.1.bb +++ b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb @@ -16,22 +16,22 @@ LIC_FILES_CHKSUM = "file://license.rst;md5=07f368487da347f3c7bd0fc3085f3afa \ file://../mcuboot/LICENSE;md5=b6ee33f1d12a5e6ee3de1e82fb51eeb8" SRC_URI = "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https;branch=${SRCBRANCH_tfm};name=tfm;destsuffix=${S} \ - git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=TF-Mv1.4.x;name=tfm-tests;destsuffix=${S}/../tf-m-tests \ + git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=release/1.5.x;name=tfm-tests;destsuffix=${S}/../tf-m-tests \ git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=master;name=mbedtls;destsuffix=${S}/../mbedtls \ git://github.com/mcu-tools/mcuboot.git;protocol=https;branch=main;name=mcuboot;destsuffix=${S}/../mcuboot \ file://cbor2.patch;patchdir=${S}/../mcuboot \ " # The required dependencies are documented in tf-m/config/config_default.cmake -# TF-Mv1.4.1 -SRCBRANCH_tfm = "TF-Mv1.4.x" -SRCREV_tfm = "dd1fe44448db0f1750794cd9cf5596033f90f6f9" +# TF-Mv1.5.0 +SRCBRANCH_tfm = "release/1.5.x" +SRCREV_tfm = "6fb14a14140f94150f959c88e3b880f48372da06" # mbedtls-3.0.0 SRCREV_mbedtls = "8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b" -# TF-Mv1.4.1 -SRCREV_tfm-tests = "60faad2ead1b967ec8e73accd793d3ed0e5c56bd" -# TF-Mv1.4-integ -SRCREV_mcuboot = "4f8091318b4026d14af9e5a7036825bff62fb612" +# TF-Mv1.5.0 +SRCREV_tfm-tests = "6131778527cf60d9b5b7ea73700a30c0fdb9ff66" +# v1.8.0 +SRCREV_mcuboot = "29099e1d17f93ae1d09fe945ad191b703aacd3d8" UPSTREAM_CHECK_GITTAGREGEX = "^TF-Mv(?P\d+(\.\d+)+)$" From patchwork Wed Dec 15 11:13:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1531 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 B0A01C433FE for ; Wed, 15 Dec 2021 11:13:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.38937.1639566795343501623 for ; Wed, 15 Dec 2021 03:13: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 09350106F for ; Wed, 15 Dec 2021 03:13: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 A8D0D3F774 for ; Wed, 15 Dec 2021 03:13:14 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/4] arm/trusted-firmware-m: use Ninja to build Date: Wed, 15 Dec 2021 11:13:10 +0000 Message-Id: <20211215111311.3066077-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215111311.3066077-1-ross.burton@arm.com> References: <20211215111311.3066077-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 ; Wed, 15 Dec 2021 11:13:16 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2717 Ninja is a better Make. Add progress feedback and parallelisation options, reducing the time to build TF-M on my machine from 100s to 6s. Signed-off-by: Ross Burton --- .../trusted-firmware-m/trusted-firmware-m_1.5.0.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 8e795deb..fe3f729c 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 @@ -48,6 +48,7 @@ INHIBIT_DEFAULT_DEPS = "1" PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS += "cmake-native \ + ninja-native \ python3-intelhex-native \ python3-jinja2-native \ python3-pyyaml-native \ @@ -88,6 +89,8 @@ EXTRA_OECMAKE += "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON" EXTRA_OECMAKE += "-DMBEDCRYPTO_PATH=${S}/../mbedtls -DTFM_TEST_REPO_PATH=${S}/../tf-m-tests -DMCUBOOT_PATH=${S}/../mcuboot" +export CMAKE_BUILD_PARALLEL_LEVEL = "${@oe.utils.parallel_make(d, False)}" + # Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application CFLAGS[unexport] = "1" LDFLAGS[unexport] = "1" @@ -103,7 +106,7 @@ do_patch[postfuncs] += "apply_local_patches" do_configure[cleandirs] = "${B}" do_configure() { - cmake -G"Unix Makefiles" -S ${S} -B ${B} ${EXTRA_OECMAKE} ${PACKAGECONFIG_CONFARGS} + cmake -GNinja -S ${S} -B ${B} ${EXTRA_OECMAKE} ${PACKAGECONFIG_CONFARGS} } # Invoke install here as there's no point in splitting compile from install: the @@ -113,6 +116,7 @@ do_configure() { do_compile() { cmake --build ${B} -- install } +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+" do_install() { # TODO install headers and static libraries when we know how they're used From patchwork Wed Dec 15 11:13:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 1529 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 A53B5C433EF for ; Wed, 15 Dec 2021 11:13:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.39271.1639566795927933289 for ; Wed, 15 Dec 2021 03:13: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 98EED11D4 for ; Wed, 15 Dec 2021 03:13: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 3B56F3F774 for ; Wed, 15 Dec 2021 03:13:15 -0800 (PST) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 4/4] arm-bsp/trusted-firmware-m: update CS1K bbappend for TF-M 1.5 Date: Wed, 15 Dec 2021 11:13:11 +0000 Message-Id: <20211215111311.3066077-4-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215111311.3066077-1-ross.burton@arm.com> References: <20211215111311.3066077-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 ; Wed, 15 Dec 2021 11:13:16 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/2718 Signed-off-by: Ross Burton --- ...-firmware-m_1.4%.bbappend => trusted-firmware-m_1.5%.bbappend} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename meta-arm-bsp/recipes-bsp/trusted-firmware-m/{trusted-firmware-m_1.4%.bbappend => trusted-firmware-m_1.5%.bbappend} (100%) diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4%.bbappend b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5%.bbappend similarity index 100% rename from meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4%.bbappend rename to meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5%.bbappend