From patchwork Mon Oct 24 12:27:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schultschik, Sven" X-Patchwork-Id: 13017527 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 A4198ECAAA1 for ; Mon, 24 Oct 2022 12:28:07 +0000 (UTC) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.49]) by mx.groups.io with SMTP id smtpd.web09.18488.1666614481000126223 for ; Mon, 24 Oct 2022 05:28:01 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@siemens.com header.s=selector2 header.b=cgfysVzY; spf=pass (domain: siemens.com, ip: 40.107.21.49, mailfrom: sven.schultschik@siemens.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mi0ApGhosMDHGHe5Q0QNqBNof8EHVKVYTp6w7HkDzjv39WtQGsTV5qVDPyUQ2A3ExQ2Fwja0FnYwzvdiBRKK0xFH+C0fvh2+Jve3x50Gyly+43g3pLKbKoWXoMqPSAmMGGrG+j/aZduasCXG/Fb1eKIiaorcMS7zLFjTXsrZdHkHe3cCEOExvzi688bBIMGy81jZT3SLyfwg5MK1Z/9WREskiULWim+vaNtI20tGpvJri3TOJOiEOm3Z4DSXb+lA9vD49xh5EsyOVRHFL9SOzKyZ+IZsGV+b3fcz1ipf1MPk8pm0UI7HOO5bIXPKoDc++DWUzqNJxKbV7ExT9Mlo5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iZICFyjodtBKQoKKIWAR+MadjYQzWKsXhFmBTM6yi78=; b=g2EciwV+5EXAdAxJhRoc7sFw0USud0QRbCaJMuDZiJuRDlOgvSSIPMZlGjM88am/pHnZG7OmC8Dt9a/LBLAp/amtnWCcAjRw/JRgy/2NoM9JGAiGgYwvwnZJsYexaNaEsxIZSiL6+ecl8JJOaf8jz0EvABM92FPUtVKgR1BmdhKiH8KgP7MUANMrWYkDERBwI7D9aXyYwO5FBJiqLSd5zsqcEsZ+6qdxXLXAmypJGvfOTlgjFT1NyEYk+KKFKLm89Xkv7+Q67nBljldLLUe3kk4L4H5QYqJeIgZXdFqrDl0usPbINOb0cbt288ebBOziAgeRP7J9aEkPLscgL2j0Bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iZICFyjodtBKQoKKIWAR+MadjYQzWKsXhFmBTM6yi78=; b=cgfysVzY6WuCEfGVb4MEmxvYSkbflGDvWkraEoVYdGrlTVFn3lTgdwueP08Rctkayiwz4OlMol2utycDKyDG7lkYDT5VCeZ7ypC4Y7Hgd5k6YOc+fg6dcf+pcyBv4/5aOfWLJVM1C7CWLyJbEuPtg87DHf7qz/C7C26KT3uC+bdXdLjWawNdGo2uDsrz8xqRsLwYLpPlIXncfTEPHQ0GtiKFBZeSKlQa/lr1gohiNITxCBnr1AQNGli1KML+s4Fz4Xm8HGaKhsHTXFcTwDmOurfhFyypdt+kmaslNjMfzmr2GUHyRIvgIn2gXrYVFE7MxdTYCnECtdgEspWS93Pi7A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from PAXPR10MB5037.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:210::11) by VI1PR10MB3565.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:800:138::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.26; Mon, 24 Oct 2022 12:27:57 +0000 Received: from PAXPR10MB5037.EURPRD10.PROD.OUTLOOK.COM ([fe80::8f3:9a82:c9ed:6a3f]) by PAXPR10MB5037.EURPRD10.PROD.OUTLOOK.COM ([fe80::8f3:9a82:c9ed:6a3f%8]) with mapi id 15.20.5746.026; Mon, 24 Oct 2022 12:27:57 +0000 From: sven.schultschik@siemens.com To: cip-dev@lists.cip-project.org CC: jan.kiszka@siemens.com, Sven Schultschik Subject: [isar-cip-core][PATCH 2/8] add recipe for optee qemu arm64 Date: Mon, 24 Oct 2022 14:27:19 +0200 Message-ID: <20221024122725.383791-3-sven.schultschik@siemens.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221024122725.383791-1-sven.schultschik@siemens.com> References: <20221024122725.383791-1-sven.schultschik@siemens.com> X-ClientProxiedBy: AS9PR04CA0106.eurprd04.prod.outlook.com (2603:10a6:20b:50e::15) To PAXPR10MB5037.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:210::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR10MB5037:EE_|VI1PR10MB3565:EE_ X-MS-Office365-Filtering-Correlation-Id: a97c09db-e43f-465c-8af4-08dab5bb2ecb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HtpdDy9hJB+4ZsEnjCMyqz2gt4vhkQCVhdcqzU7qBOh51Dc9kQz37U6K/rgoUDO3SerfQUT7xatgDVulAXYW9emDw4FXSYmLnDJr+iIRC7w2s93Geyys55D9zG6wnDz+Vt2YNmT+vs0oW5ugtxQAf/tneVMkvqmn2BYV6jCFZMUUB5bnfL1DFKg0gw9MyWnxAVqnoMQ6KOZUYCj6onwRq5kxQ2jLoADwFDcnj2odAzxiSjuJrZAcvdfqoafa/qVLBBpUkPy4QhT4tjvE2SK9iBgx5TM/sowsh8nLLwzUp3TkQ/sl/gXDDO6edWWTypp6gJHJZA1V7YD5BijII9gS41tx66JVP3FOow8koaS1CDk/NmcxhIkA8rUl1ELwzu8GXswCr5REH0JEi6GuqEsDPP3htiPL+Oq9zm8LFAd7qR4FXE6dcVzmQwtTDNDeWsAeKl8yIFSEdUPz3dWQi2E51bHxchEqoxZHV1LonODBQKhHmugeE6MUJyZDyIGzAQdiFzyeXFQTf75+2zqqZeQiUlstuIIhpz37DAwynBTHK/IQrp0i3rtstwi56b6WwwMjZOYpJC7sSZytxYczXyYFTjtkTPScm0WJOGCcDtIiWsGhR4oCIqvt2pyYbRAGJsoG32kyQl42bvcxFwVmZY/iv3foJlCLWdluQ2mJbojSziWS8gW2GNKe8hFUP853hlrAJuKXy8wiAPuy2S8cRy0dl48R4vdDVc5rAvk8KMIQtRE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR10MB5037.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(39860400002)(346002)(136003)(366004)(396003)(451199015)(9686003)(6916009)(36756003)(4326008)(2906002)(5660300002)(8676002)(66556008)(66946007)(41300700001)(66476007)(86362001)(6512007)(316002)(8936002)(26005)(6506007)(186003)(2616005)(82960400001)(1076003)(38100700002)(107886003)(6486002)(478600001)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 041T7W2fyxySvOrjgdeO3mMbRcXudDcqsdnJrACkUTG6aQ5+M+t4MBNCdMZm05nNx8AFv2n3887n50eGVJb9Cc0yManRuT5Cil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Nx+TB42DXZuYjp9uGUwIveOfqRtIn7fjYkHNbaDnKKuPanqFUtQ5rP5S8mR9rlsNomxiYA/ak9sHbglhbMy5sZSwKuzTKOpJB+8xSmca7XQ+s3vRIeM68Q951T+OY8gbz/3XBWrhA5q32zj3dAIb5CnJetVq7ppM3kIZeMndWya0fQCGZwWSRcSa5MkhkydblWNwHYIsnRgfYjsIXCQN3EIN46BWg5Uw655bsndduNlvVb2sBEMRm4SOPdAKb6bO4zsIO+gtcsh3qBZsaQGQFGjqShdLXvnIvpTGY0m6IbnTinkvgfCqPiJ9pwV0n7beVRUCSGTTexJgl/MpaaaaagbFQZpMr82CCk3iXWjQvhCeEZsebr9O0VnMyCixh6w9f4hMpcrylYNrvzoeQI40/DoLAbRTNfuVYia0RNQ7pjnVT5lvNqw== X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: a97c09db-e43f-465c-8af4-08dab5bb2ecb X-MS-Exchange-CrossTenant-AuthSource: PAXPR10MB5037.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2022 12:27:57.5886 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NwZf6IVa3cJQebpq7RLsuukLnZsKlwDyiCtp+O0Ip31jfIlMd0nJyl8HoHo2Q2kk0kYpV7mTLOqBevugqUd1DeesS4GrAVdcXYa6EILV5H0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3565 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, 24 Oct 2022 12:28:07 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/9806 From: Sven Schultschik The recipe provides the possibility to create optee-os binaries for use inside of an qemu secureboot setup with edk2, rpmb, u-boot and uefi Signed-off-by: Sven Schultschik --- .../op-tee/optee-os-qemu-arm64_3.17.0.bb | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 recipes-bsp/op-tee/optee-os-qemu-arm64_3.17.0.bb diff --git a/recipes-bsp/op-tee/optee-os-qemu-arm64_3.17.0.bb b/recipes-bsp/op-tee/optee-os-qemu-arm64_3.17.0.bb new file mode 100644 index 000000000..3d1325432 --- /dev/null +++ b/recipes-bsp/op-tee/optee-os-qemu-arm64_3.17.0.bb @@ -0,0 +1,54 @@ +# +# CIP Core, generic profile +# +# Copyright (c) Siemens AG, 2022 +# +# Authors: +# Sven Schultschik +# +# SPDX-License-Identifier: MIT +# + +HOMEPAGE = "https://github.com/OP-TEE/optee_os" +MAINTAINER = "Sven Schultschik " +LICENSE = "BSD-2-Clause" + +require recipes-bsp/optee-os/optee-os-custom.inc + +SRC_URI += " \ + git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https" +SRCREV = "${PV}" + +S = "${WORKDIR}/git" + +OPTEE_PLATFORM = "vexpress-qemu_armv8a" + +OPTEE_BINARIES = "tee-header_v2.bin \ + tee-pager_v2.bin \ + tee-pageable_v2.bin" + +DEPENDS = "edk2" +DEBIAN_BUILD_DEPENDS += " ,\ + debhelper(>= 11~), \ + cpio, \ + python3-cryptography:native, \ + python3-serial:native, \ + device-tree-compiler, \ + edk2, \ + gcc-arm-linux-gnueabihf," + +OPTEE_EXTRA_BUILDARGS = "CFG_STMM_PATH=/usr/lib/edk2/BL32_AP_MM.fd CFG_RPMB_FS=y \ + CFG_RPMB_FS_DEV_ID=0 CFG_CORE_HEAP_SIZE=524288 CFG_RPMB_WRITE_KEY=1 \ + CFG_CORE_DYN_SHM=y CFG_RPMB_TESTKEY=y \ + CFG_REE_FS=n\ + CFG_TEE_CORE_LOG_LEVEL=1 CFG_TEE_TA_LOG_LEVEL=1 CFG_SCTLR_ALIGNMENT_CHECK=n \ + CFG_ARM64_core=y CFG_CORE_ARM64_PA_BITS=48" + +do_prepare_build_append() { + # $(ARCH) is the CPU architecture to be built. + # Currently, the only supported value is arm for 32-bit or 64-bit Armv7-A or Armv8-A. + # Please note that contrary to the Linux kernel, $(ARCH) should not be set to arm64 for 64-bit builds. + sed -i \ + "s/\$(MAKE)/ARCH=\"arm\" CROSS_COMPILE32=arm-linux-gnueabihf- CROSS_COMPILE64=aarch64-linux-gnu- \$(MAKE)/g" \ + ${S}/debian/rules +}