From patchwork Sun Nov 22 21:53:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 188 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp2785374oou; Sun, 22 Nov 2020 23:54:04 -0800 (PST) X-Received: by 2002:a2e:9848:: with SMTP id e8mr13708314ljj.353.1606118044188; Sun, 22 Nov 2020 23:54:04 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606118044; cv=pass; d=google.com; s=arc-20160816; b=BlAha9EC/GFv5bEKzFxvxw0NlzKqzaraYdWI2XBLtbk8a7EJ2uInm3CwnIrSEgsPnc L+BPRekE8kEJMnMkMEEijjrRWAqKGUjgq8ALlDisRHM8KEsUP+/CheIqcza9hY7v9t6f vs+8Rua0sEuCF3gj+bVkxZdUualmEDgcvJ4DULG5T9unxFP5s6Cw1tT73Uxd1fF2XQhx CzciwUBWPbOrcjcxFXi+J9dE1uB/a9EmWHVd5n7FBp8yxTqsDCCgRLkWlQgbgoluRqe0 Xnm6ZOwqRSIQFQ9/6X1PyZmdU5hfCfwCXQbqAJx1GriBEbbGhMrTY4LZnoxPAiHtr9AC uKww== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:dkim-signature; bh=CUTy3qerHLuINpzTH5gnZgwG8X3SHxDcrdYqyBzY/U0=; b=1Ff/gY+NJANfH7nCVRzuIR5ewVHsqj1euDwUtko6E7aBAF7iEJpdavc6pUXRR/cT2y /ZCgiMMLjbbOuL+TFUTDq/er6r7Tsp3nSNORwVnQQhiM5rDN9Q4D4QLE5QVUc9x0VdHY xD5oz5cN+ug9gW+09lxpltI2zuGnYTYKygeyUP0zLQ947/97hvaN69whlDkAcBi5fcM3 /HgBpKsnwiMWTR9Ip1C45LHCLv3e+02FRapxJ7eIcPvI5D/GQ6ajEdOCeS4Ku7e0WtlM PvzQK7unE0f8ChpJE2RoiwncOBxL6ZDt8dS8Wx01GkJNun1TIY92KNfx5DpB0UNxF+hK CzkQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=mFVGkSaG; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbcji7smnv4nbbg6v5x6qkgqetouvoha@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCJI7SMNV4NBBG6V5X6QKGQETOUVOHA@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id c23sor563751lja.58.2020.11.22.23.54.04 (Google Transport Security); Sun, 22 Nov 2020 23:54:04 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcji7smnv4nbbg6v5x6qkgqetouvoha@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=mFVGkSaG; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbcji7smnv4nbbg6v5x6qkgqetouvoha@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCJI7SMNV4NBBG6V5X6QKGQETOUVOHA@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1606118044; cv=pass; d=google.com; s=arc-20160816; b=Ku5VAiKAyGp4z9j4VATcFAN6L+DAAalYTc4uzHfLRm34X0NriSxskAkY+IUAUC8dcv PBC1vIfnst5OSu3pZ9s++W50SLXrU1a0o3Tfzt5iP8oKDttCwhRZ7zkps+XpXh800TFM iua4c8m3V5agAq5UmB5kHPynWL1kZyBLPLFpKXvzG35D1pQS1QKsQhj1xYp1iS2UsuFm 6SsifMf1h/AgI554JHxy6InqcJuIsOmAJ9WsLD5WsvDsGfgS5wfYuosK7MRBacuHpyAY aRCSjAR1+HjTKsksCEi6ZbhRKRMbrpmlvhHYDWekn4jrGn8vFCGbawq+tT1NeEf3zMjE /dYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:dkim-signature; bh=CUTy3qerHLuINpzTH5gnZgwG8X3SHxDcrdYqyBzY/U0=; b=dh2sISPJ2YYxreZMA1OmydbXf+QiA/Z1Qid2ZH9y5496fvLmNe+fYp9CA7SIUanImP D4Ktf/YqWCC1MGNkNZB/QVhx1SrAqY8sfcY/HRFiywyHiG7fgB4Xpz5ylgnXt3mJEhze Jkqs+51t/+yNKxcKvp5qbjRnI7jOULEgoS3PCYd7NqmWGcTNpG/i0id+M5F4GwtGGPfz SrXi/AGMd3pfjCmSQR0l9PpcCppaU9FTHNvO4vKGV3noxvaA+TRoDd/WhI0uW489edgx 0U57b0bfW0RFE9AalzCmlFhRhKyM7++RWy8kO3K8YmYrMgtcPmMsfh6VJ3Vij8tU6DVw GRhg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=CUTy3qerHLuINpzTH5gnZgwG8X3SHxDcrdYqyBzY/U0=; b=mFVGkSaG6HD14a80sdtJSmUSljaq0uNqqZ24dP6sXoGEmmQzekUkugzLGpPWx+GIqI NsbfoVomBG8569GxckDwjrD9SDwXZlSlNp9T2taDOgw0BqXNmYUeotPpEnLwCQqAbVNu a8vvIBFBPir/+2wxHicIxlnDG7RctzLdmHVgd7rUyAPW3irWDSysFZc2f9dCZM02vdTy VdjgP+Hle+kzzCkr6gTEKe+mCqO8OTP8XAni345Dq06HpA+N+WJmWiajlLichZIUbgRo LIlgLNcYyi6MoevcQnEjWq6v/OkZzyPkaF1yOhVR5JsfjzyER5i8DXz/r3eeqgjQZcUM Mt7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=CUTy3qerHLuINpzTH5gnZgwG8X3SHxDcrdYqyBzY/U0=; b=lm1ruOAsjJMaRKB7G2iUAXo42BVx9U9BL93Qdu6an0c7J4V1lwb1G+5Q13rSFhuzDa WBgqbDaLerQ4zOswmguQuYEOqjxSS4bI+X31IilJIFw3Lj1t4EGAY+xM1K30F2+LbSYb H5g6qx+JcX7bTxKquu7RHs+lSp9IQ358/ARCWii5teUsAnMGuXzxiWP+28OxXovWf4de Iq4+BTc8Api/vzQ4hXuuPUNkV77LNN7elnbumnkbqOz6niG4YwGjcTdiXsmcKd8KaBvR XxXXE+ZRdhnxlbVjy2ekSg0KYO+SmuKqPSoDXiLfkfUNxbGB8Sde1ftuMrg3HsPWW25x MPsA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530Bt7Hli/96m/Ms84s5Tk/xFjwjivIsTYtGiKBzzGGJEHrBt5i7 mBRMYQkNeW4Y5skY2R9XTc0= X-Google-Smtp-Source: ABdhPJzw6oq2+4UuKTG0cC4TdXkU983a34RpIH3t31YWoaF11eQmU61QMcBy6wYYphJm8aHgzE7e3Q== X-Received: by 2002:a2e:b176:: with SMTP id a22mr12940474ljm.391.1606118043853; Sun, 22 Nov 2020 23:54:03 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:d0e:: with SMTP id 14ls2478293lfn.0.gmail; Sun, 22 Nov 2020 23:54:02 -0800 (PST) X-Received: by 2002:a19:228f:: with SMTP id i137mr13788148lfi.477.1606118042907; Sun, 22 Nov 2020 23:54:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606118042; cv=none; d=google.com; s=arc-20160816; b=ZzXUzKH69xxglXJ29bOGdVWgaYgn7V/Gh3BfR0UjaIJxR8g3xYs/HL8709n+wQSurh rkMUAvq+CunnrQ4Pzm0uM8T+5EHaJepIEFW9h2S1qIlaUUhNKorFqNEAF+juiVMWX+lE KS6Htc4n5+y8Clu21j1kaRkYIbYg2RJeAp0tGpSTRflY0zCYJmaev2ybsCOxiw86N9gS cDLb9L4tjY4N/KxNOkF2Y/LZRnUMGha9KuHk5SWQVM43158mN/3CEebxH2U45sKJHm45 3w2KgeaPZeSDO1OpSTVBpXCtvjcaN7PXwZ/rdDYEV77I6v+HQziAbG6rYHTJwao4P/4A 5v6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from; bh=Vs/3tHHX5t2HMBuWLZpHDSjcSY7SLrLi6eUnZY5YR9c=; b=sOZqRdxPAJ5VIYsUvJERWa/HLhBZxQ/XbcMQSxhIuPahMZ+1uIuhxWDRcNKD8HUABD XnkWqgofi4oi+LnGAPI5Valirc+y0EgpcwsG0Bg4IKouC1bEGBPMA7sx+62PmC77yT/2 2a3ZzJGRV2328haRzNY1mqAf1eZlvW9ALSNaZWLQVRRlcR7E1I2+i48ZNzIpEGQQBvIk 920UCmTItKgvmAik7DtKUn9FcpPiGz8rDnobUgsfzgozC7R5VJT7JePRasgSibAr7KBu CUlmAVzFUOM3eRQWNxgXvptVZBs1UVdjEUvFDWz6QuuMMlH4H/flZZh7jOb+R9648WYe htaw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id y84si327778lfa.6.2020.11.22.23.54.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Nov 2020 23:54:02 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 0AN7s2kJ007445 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 23 Nov 2020 08:54:02 +0100 Received: from md1f2u6c.ad001.siemens.net ([167.87.38.29]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 0AN7rxTw017265 for ; Mon, 23 Nov 2020 08:54:02 +0100 From: Jan Kiszka To: isar-users Subject: [PATCH v4 08/11] stm32mp15x: Switch to TF-A based boot Date: Mon, 23 Nov 2020 08:53:56 +0100 Message-Id: <81dc720db952e9c6e7c88896517b7b1401ef0291.1606118039.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1684136834552778589?= X-GMAIL-MSGID: =?utf-8?q?1684136834552778589?= From: Jan Kiszka This demonstrates the usage of the TF-A include for building custom firmware versions. Signed-off-by: Jan Kiszka --- meta-isar/conf/machine/stm32mp15x.conf | 8 +++---- .../trusted-firmware-a-stm32mp15x_2.3.bb | 21 +++++++++++++++++++ .../lib/wic/canned-wks/stm32mp15x.wks.in | 6 +++--- 3 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 meta-isar/recipes-bsp/trusted-firmware-a/trusted-firmware-a-stm32mp15x_2.3.bb diff --git a/meta-isar/conf/machine/stm32mp15x.conf b/meta-isar/conf/machine/stm32mp15x.conf index 7ef36e68..66a47df4 100644 --- a/meta-isar/conf/machine/stm32mp15x.conf +++ b/meta-isar/conf/machine/stm32mp15x.conf @@ -8,12 +8,12 @@ DISTRO_ARCH ?= "armhf" KERNEL_NAME ?= "mainline" PREFERRED_PROVIDER_u-boot-stm32mp15x = "u-boot-stm32mp15x" -U_BOOT_CONFIG_stm32mp15x = "stm32mp15_basic_defconfig" -U_BOOT_BIN_stm32mp15x = "u-boot-spl.stm32 u-boot.img" +U_BOOT_CONFIG_stm32mp15x = "stm32mp15_trusted_defconfig" +U_BOOT_BIN_stm32mp15x = "u-boot.stm32" IMAGE_TYPE ?= "wic-img" WKS_FILE ?= "stm32mp15x.wks.in" -IMAGER_INSTALL += "u-boot-stm32mp15x" -IMAGER_BUILD_DEPS += "u-boot-stm32mp15x" +IMAGER_INSTALL += "trusted-firmware-a-stm32mp15x u-boot-stm32mp15x" +IMAGER_BUILD_DEPS += "trusted-firmware-a-stm32mp15x u-boot-stm32mp15x" IMAGE_INSTALL += "u-boot-script" diff --git a/meta-isar/recipes-bsp/trusted-firmware-a/trusted-firmware-a-stm32mp15x_2.3.bb b/meta-isar/recipes-bsp/trusted-firmware-a/trusted-firmware-a-stm32mp15x_2.3.bb new file mode 100644 index 00000000..97d683f7 --- /dev/null +++ b/meta-isar/recipes-bsp/trusted-firmware-a/trusted-firmware-a-stm32mp15x_2.3.bb @@ -0,0 +1,21 @@ +# +# Copyright (c) Siemens AG, 2020 +# +# SPDX-License-Identifier: MIT + +require recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc + +SRC_URI += "https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-${PV}.tar.gz" +SRC_URI[sha256sum] = "37f917922bcef181164908c470a2f941006791c0113d738c498d39d95d543b21" + +S = "${WORKDIR}/trusted-firmware-a-${PV}" + +DEBIAN_BUILD_DEPENDS += ", device-tree-compiler" + +TF_A_PLATFORM = "stm32mp1" +TF_A_EXTRA_BUILDARGS = " \ + ARCH=aarch32 ARM_ARCH_MAJOR=7 AARCH32_SP=sp_min \ + STM32MP_SDMMC=1 STM32MP_EMMC=1 \ + STM32MP_RAW_NAND=1 STM32MP_SPI_NAND=1 STM32MP_SPI_NOR=1 \ + DTB_FILE_NAME=stm32mp157c-ev1.dtb" +TF_A_BINARIES = "release/tf-a-stm32mp157c-ev1.stm32" diff --git a/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in b/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in index a9fb332d..5abaa833 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in +++ b/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in @@ -3,9 +3,9 @@ # # SPDX-License-Identifier: MIT -part fsbl1 --part-name fsbl1 --source rawcopy --sourceparams "file=/usr/lib/u-boot/${MACHINE}/u-boot-spl.stm32" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 256K -part fsbl2 --part-name fsbl2 --source rawcopy --sourceparams "file=/usr/lib/u-boot/${MACHINE}/u-boot-spl.stm32" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 256K -part ssbl --part-name ssbl --source rawcopy --sourceparams "file=/usr/lib/u-boot/${MACHINE}/u-boot.img" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 2048K +part fsbl1 --part-name fsbl1 --source rawcopy --sourceparams "file=/usr/lib/trusted-firmware-a/${MACHINE}/tf-a-stm32mp157c-ev1.stm32" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 256K +part fsbl2 --part-name fsbl2 --source rawcopy --sourceparams "file=/usr/lib/trusted-firmware-a/${MACHINE}/tf-a-stm32mp157c-ev1.stm32" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 256K +part ssbl --part-name ssbl --source rawcopy --sourceparams "file=/usr/lib/u-boot/${MACHINE}/u-boot.stm32" --fstype=ext4 --fsoptions "noauto" --part-type 0x8301 --fixed-size 2048K part / --source rootfs-u-boot --fstype ext4 --label root --align 1024 --active --use-uuid