From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH v2 08/11] stm32mp15x: Switch to TF-A based boot
Date: Thu, 15 Oct 2020 11:43:37 +0200 [thread overview]
Message-ID: <5584c38a98b554d8822e094e3935a7e2c3197037.1602755020.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1602755020.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
This demonstrates the usage of the TF-A include for building custom
firmware versions.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
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..0a45ec36
--- /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 = "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
--
2.26.2
next prev parent reply other threads:[~2020-10-15 9:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-15 9:43 [PATCH v2 00/11] Support for building TF-A and OP-TEE, add STM32MP15x board Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 01/11] meta-isar: Lift de0-nano-soc build to buster Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 02/11] meta-isar: linux-mainline: Update to latest 5.4.70 Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 03/11] meta-isar: u-boot: Update to 2020.10 Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 04/11] meta-isar: u-boot: Factor our de0-nano-soc recipe Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 05/11] meta-isar: example-raw: Purge securetty from target image Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 06/11] Add STM32MP15x eval board Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 07/11] Add recipe include for building custom Trusted Firmware A Jan Kiszka
2020-11-21 13:42 ` [PATCH v3 " Jan Kiszka
2020-10-15 9:43 ` Jan Kiszka [this message]
2020-11-21 13:42 ` [PATCH v3 08/11] stm32mp15x: Switch to TF-A based boot Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 09/11] Add recipe include for building custom OP-TEE Jan Kiszka
2020-11-21 18:05 ` [PATCH v3 " Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 10/11] meta-isar: u-boot-stm32mp15x: Add patches needed for OP-TEE usage Jan Kiszka
2020-10-15 9:43 ` [PATCH v2 11/11] meta-isar: Add OP-TEE to STM32MP15x board Jan Kiszka
2020-11-21 7:35 ` [PATCH v2 00/11] Support for building TF-A and OP-TEE, add " Jan Kiszka
2020-11-22 14:46 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5584c38a98b554d8822e094e3935a7e2c3197037.1602755020.git.jan.kiszka@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox