From patchwork Fri Jun 30 11:23:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rouven Czerwinski X-Patchwork-Id: 26733 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 97F75EB64DD for ; Fri, 30 Jun 2023 11:24:07 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by mx.groups.io with SMTP id smtpd.web10.9534.1688124238951662097 for ; Fri, 30 Jun 2023 04:23:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: pengutronix.de, ip: 85.220.165.71, mailfrom: rcz@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFCEG-0008Eh-Fa; Fri, 30 Jun 2023 13:23:56 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qFCEF-00B780-Py; Fri, 30 Jun 2023 13:23:55 +0200 Received: from rcz by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qFCEF-00DuEQ-1Y; Fri, 30 Jun 2023 13:23:55 +0200 From: Rouven Czerwinski To: meta-arm@lists.yoctoproject.org Cc: Rouven Czerwinski Subject: [PATCH 1/3] optee-os: add optional optee-os-ta package Date: Fri, 30 Jun 2023 13:23:39 +0200 Message-Id: <20230630112340.3314395-1-r.czerwinski@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: rcz@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: meta-arm@lists.yoctoproject.org 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, 30 Jun 2023 11:24:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4847 The optee-os compilation provides not only the core files, TAs are also usually build. Create a separate package which contains them, so they can be installed. Signed-off-by: Rouven Czerwinski --- meta-arm/recipes-security/optee/optee-os.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta-arm/recipes-security/optee/optee-os.inc b/meta-arm/recipes-security/optee/optee-os.inc index bb6974b2..6c5f24f6 100644 --- a/meta-arm/recipes-security/optee/optee-os.inc +++ b/meta-arm/recipes-security/optee/optee-os.inc @@ -56,6 +56,10 @@ do_install() { #install core in firmware install -d ${D}${nonarch_base_libdir}/firmware/ install -m 644 ${B}/core/*.bin ${B}/core/tee.elf ${D}${nonarch_base_libdir}/firmware/ + + #install tas in optee_armtz + install -d ${D}${nonarch_base_libdir}/optee_armtz/ + install -m 444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz } PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -69,7 +73,10 @@ addtask deploy before do_build after do_install SYSROOT_DIRS += "${nonarch_base_libdir}/firmware" +PACKAGES += "${PN}-ta" FILES:${PN} = "${nonarch_base_libdir}/firmware/" +FILES:${PN}-ta = "${nonarch_base_libdir}/optee_armtz/*" + # note: "textrel" is not triggered on all archs INSANE_SKIP:${PN} = "textrel" From patchwork Fri Jun 30 11:23:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rouven Czerwinski X-Patchwork-Id: 26731 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 98ED8C001B0 for ; Fri, 30 Jun 2023 11:24:07 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by mx.groups.io with SMTP id smtpd.web10.9533.1688124238947793166 for ; Fri, 30 Jun 2023 04:23:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: pengutronix.de, ip: 85.220.165.71, mailfrom: rcz@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFCEG-0008Ej-NK; Fri, 30 Jun 2023 13:23:56 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qFCEG-00B786-2C; Fri, 30 Jun 2023 13:23:56 +0200 Received: from rcz by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qFCEF-00DuET-1b; Fri, 30 Jun 2023 13:23:55 +0200 From: Rouven Czerwinski To: meta-arm@lists.yoctoproject.org Cc: Rouven Czerwinski Subject: [PATCH 2/3] optee-os: deploy ta elf files Date: Fri, 30 Jun 2023 13:23:40 +0200 Message-Id: <20230630112340.3314395-2-r.czerwinski@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230630112340.3314395-1-r.czerwinski@pengutronix.de> References: <20230630112340.3314395-1-r.czerwinski@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: rcz@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: meta-arm@lists.yoctoproject.org 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, 30 Jun 2023 11:24:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4846 The TA builds always create ELF files, add them to the deploy dir to ease debugging via the OP-TEE symbolize.py script. Signed-off-by: Rouven Czerwinski --- meta-arm/recipes-security/optee/optee-os.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-arm/recipes-security/optee/optee-os.inc b/meta-arm/recipes-security/optee/optee-os.inc index 6c5f24f6..2e3403da 100644 --- a/meta-arm/recipes-security/optee/optee-os.inc +++ b/meta-arm/recipes-security/optee/optee-os.inc @@ -67,6 +67,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" do_deploy() { install -d ${DEPLOYDIR}/${MLPREFIX}optee install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/${MLPREFIX}optee + + install -d ${DEPLOYDIR}/${MLPREFIX}optee/ta + install -m 644 ${B}/ta/*/*.elf ${DEPLOYDIR}/${MLPREFIX}optee/ta } addtask deploy before do_build after do_install From patchwork Fri Jun 30 11:23:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rouven Czerwinski X-Patchwork-Id: 26732 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 99FA9C3DA40 for ; Fri, 30 Jun 2023 11:24:07 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) by mx.groups.io with SMTP id smtpd.web10.9532.1688124238289962087 for ; Fri, 30 Jun 2023 04:23:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: pengutronix.de, ip: 85.220.165.71, mailfrom: rcz@pengutronix.de) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qFCEG-0008Ei-IY; Fri, 30 Jun 2023 13:23:56 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qFCEF-00B783-Tc; Fri, 30 Jun 2023 13:23:55 +0200 Received: from rcz by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qFCEF-00DuEX-1c; Fri, 30 Jun 2023 13:23:55 +0200 From: Rouven Czerwinski To: meta-arm@lists.yoctoproject.org Cc: Rouven Czerwinski Subject: [PATCH 3/3] optee-test: add TA elfs to deploydir Date: Fri, 30 Jun 2023 13:23:41 +0200 Message-Id: <20230630112340.3314395-3-r.czerwinski@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230630112340.3314395-1-r.czerwinski@pengutronix.de> References: <20230630112340.3314395-1-r.czerwinski@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: rcz@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: meta-arm@lists.yoctoproject.org 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, 30 Jun 2023 11:24:07 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4845 Same as for OP-TEE client, this eases debugging and is required to use the OP-TEE symbolize.py script. Signed-off-by: Rouven Czerwinski --- meta-arm/recipes-security/optee/optee-test.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-arm/recipes-security/optee/optee-test.inc b/meta-arm/recipes-security/optee/optee-test.inc index 64b41a8e..90b72b9f 100644 --- a/meta-arm/recipes-security/optee/optee-test.inc +++ b/meta-arm/recipes-security/optee/optee-test.inc @@ -6,6 +6,7 @@ LICENSE = "BSD-2-Clause & GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" inherit python3native ptest +inherit deploy require optee.inc DEPENDS = "optee-client optee-os-tadevkit python3-cryptography-native" @@ -43,6 +44,13 @@ do_install () { install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/ } +do_deploy () { + install -d ${DEPLOYDIR}/${MLPREFIX}optee/ta + install -m 644 ${B}/ta/*/*.elf ${DEPLOYDIR}/${MLPREFIX}optee/ta +} + +addtask deploy before do_build after do_install + FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \ ${libdir}/tee-supplicant/plugins/ \ "