[v4,06/11] Add STM32MP15x eval board

Message ID 9365c3b910486291b1707eaa175bf27f05a1c583.1606118039.git.jan.kiszka@siemens.com
State Accepted, archived
Headers show
Series Support for building TF-A and OP-TEE, add STM32MP15x board | expand

Commit Message

Jan Kiszka Nov. 22, 2020, 9:53 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This adds another ARMv7 board, using buster this time. It's primary
purpose will be acting as a TF-A test target. It was chosen due to its
simplicity and clean upstream support.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta-isar/conf/local.conf.sample              |  1 +
 meta-isar/conf/machine/stm32mp15x.conf        | 19 +++++++++++++++++++
 .../conf/multiconfig/stm32mp15x-buster.conf   |  7 +++++++
 .../u-boot/u-boot-stm32mp15x_2020.10.bb       |  6 ++++++
 .../lib/wic/canned-wks/stm32mp15x.wks.in      | 12 ++++++++++++
 scripts/ci_build.sh                           |  1 +
 6 files changed, 46 insertions(+)
 create mode 100644 meta-isar/conf/machine/stm32mp15x.conf
 create mode 100644 meta-isar/conf/multiconfig/stm32mp15x-buster.conf
 create mode 100644 meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb
 create mode 100644 meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in

Patch

diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index 3e95bf3a..1db6b883 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -60,6 +60,7 @@  BBMULTICONFIG = " \
     hikey-stretch \
     nand-ubi-demo-buster \
     nanopi-neo-buster \
+    stm32mp15x-buster \
     rpi-stretch \
     sifive-fu540-sid-ports \
 "
diff --git a/meta-isar/conf/machine/stm32mp15x.conf b/meta-isar/conf/machine/stm32mp15x.conf
new file mode 100644
index 00000000..7ef36e68
--- /dev/null
+++ b/meta-isar/conf/machine/stm32mp15x.conf
@@ -0,0 +1,19 @@ 
+#
+# Copyright (c) Siemens AG, 2020
+#
+# SPDX-License-Identifier: MIT
+
+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"
+
+IMAGE_TYPE ?= "wic-img"
+WKS_FILE ?= "stm32mp15x.wks.in"
+IMAGER_INSTALL += "u-boot-stm32mp15x"
+IMAGER_BUILD_DEPS += "u-boot-stm32mp15x"
+
+IMAGE_INSTALL += "u-boot-script"
diff --git a/meta-isar/conf/multiconfig/stm32mp15x-buster.conf b/meta-isar/conf/multiconfig/stm32mp15x-buster.conf
new file mode 100644
index 00000000..d1b76d0f
--- /dev/null
+++ b/meta-isar/conf/multiconfig/stm32mp15x-buster.conf
@@ -0,0 +1,7 @@ 
+#
+# Copyright (c) Siemens AG, 2020
+#
+# SPDX-License-Identifier: MIT
+
+MACHINE = "stm32mp15x"
+DISTRO = "debian-buster"
diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb b/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb
new file mode 100644
index 00000000..6d956434
--- /dev/null
+++ b/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb
@@ -0,0 +1,6 @@ 
+#
+# Copyright (c) Siemens AG, 2020
+#
+# SPDX-License-Identifier: MIT
+
+require u-boot-${PV}.inc
diff --git a/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in b/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in
new file mode 100644
index 00000000..a9fb332d
--- /dev/null
+++ b/meta-isar/scripts/lib/wic/canned-wks/stm32mp15x.wks.in
@@ -0,0 +1,12 @@ 
+#
+# Copyright (c) Siemens AG, 2020
+#
+# 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 / --source rootfs-u-boot --fstype ext4 --label root --align 1024 --active --use-uuid
+
+bootloader --ptable gpt --append="rootwait rw console=ttySTM0,115200"
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index f1f6503e..0053809c 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -49,6 +49,7 @@  CROSS_TARGETS_SET="\
                   mc:qemuarm64-stretch:isar-image-base \
                   mc:qemuamd64-stretch:isar-image-base \
                   mc:de0-nano-soc-buster:isar-image-base \
+                  mc:stm32mp15x-buster:isar-image-base \
                   mc:rpi-stretch:isar-image-base"
 
 CROSS_TARGETS_SET_BULLSEYE="\