DistroKit Mailinglist
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH 12/12] v7a: stm32mp: add image recipe for STM32MP135F-DK
Date: Fri, 15 Mar 2024 22:12:40 +0100	[thread overview]
Message-ID: <20240315211240.3016716-13-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240315211240.3016716-1-a.fatoum@pengutronix.de>

Now, that we have TF-A, OP-TEE, barebox and kernel in-place, let's build
an image that combines all of them that can be booted by writing to the
SD-Card of the STM32MP135F-DK.

Notably missing is Ethernet support as that's not mainline yet.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../config/images/stm32mp-optee.config        | 60 +++++++++++++++++++
 configs/platform-v7a/platformconfig           |  3 +-
 .../platforms/image-stm32mp135f-dk.in         | 13 ++++
 .../rules/image-stm32mp135f-dk.make           | 34 +++++++++++
 4 files changed, 109 insertions(+), 1 deletion(-)
 create mode 100644 configs/platform-v7a/config/images/stm32mp-optee.config
 create mode 100644 configs/platform-v7a/platforms/image-stm32mp135f-dk.in
 create mode 100644 configs/platform-v7a/rules/image-stm32mp135f-dk.make

diff --git a/configs/platform-v7a/config/images/stm32mp-optee.config b/configs/platform-v7a/config/images/stm32mp-optee.config
new file mode 100644
index 000000000000..f9c16a237f82
--- /dev/null
+++ b/configs/platform-v7a/config/images/stm32mp-optee.config
@@ -0,0 +1,60 @@
+image @IMAGE@ {
+	hdimage {
+		align = 1M
+		partition-table-type = gpt
+		gpt-no-backup = true
+	}
+
+	/* below three partitions are unused when booting from eMMC boot partition */
+	partition fsbl1 {
+		image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+	partition fsbl2 {
+		image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+	partition fip {
+		image = "@STM32MP_BOARD@.fip"
+		size = 2M
+	}
+
+	partition barebox-environment {
+		size = 1M
+	}
+	partition barebox-state {
+		partition-type-uuid = "4778ed65-bf42-45fa-9c5b-287a1dc4aab1"
+		size = 1M
+	}
+	partition root-A {
+		partition-type-uuid = 69dad710-2ce4-4e3c-b16c-21a1d49abed3 # root-arm
+		image = root.ext2
+	}
+}
+
+image @STM32MP_BOARD@-emmcboot.img {
+	hdimage {
+		partition-table = false
+	}
+
+	partition fsbl {
+		image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+
+	partition fip {
+		image = "@STM32MP_BOARD@.fip"
+		offset = 256K
+	}
+}
+
+image @STM32MP_BOARD@.fip {
+	fip {
+		fw-config = "stm32mp1-@STM32MP_BOARD@-fw-config.dtb"
+		hw-config = "@STM32MP_BOARD@.dtb-bb"
+		nt-fw = "barebox-stm32mp-generic-bl33.img"
+		tos-fw = { "tee-header_v2.bin", "tee-pager_v2.bin", "tee-pageable_v2.bin" }
+	}
+	size = 2M
+}
+/* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 797b4cb72664..83d2e5f7102a 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -203,7 +203,7 @@ PTXCONF_OPTEE=y
 PTXCONF_OPTEE_PLATFORM="stm32mp1"
 PTXCONF_OPTEE_PLATFORM_FLAVOUR="135F_DK"
 PTXCONF_OPTEE_CFG="CFG_TEE_CORE_LOG_LEVEL=2 CFG_WITH_PAGER=n"
-# PTXCONF_TF_A_STM32MP13 is not set
+PTXCONF_TF_A_STM32MP13=y
 PTXCONF_TF_A=y
 PTXCONF_TF_A_URL="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot"
 PTXCONF_TF_A_VERSION="v2.10"
@@ -293,6 +293,7 @@ PTXCONF_IMAGE_RPI2=y
 PTXCONF_IMAGE_SABRELITE=y
 PTXCONF_IMAGE_SAMA5D27_GIANTBOARD=y
 PTXCONF_IMAGE_SAMA5D27_SOM1_EK=y
+PTXCONF_IMAGE_STM32MP135F_DK=y
 PTXCONF_IMAGE_STM32MP157C_DK2=y
 PTXCONF_IMAGE_STM32MP157C_EV1=y
 PTXCONF_IMAGE_UDOO_NEO=y
diff --git a/configs/platform-v7a/platforms/image-stm32mp135f-dk.in b/configs/platform-v7a/platforms/image-stm32mp135f-dk.in
new file mode 100644
index 000000000000..4b06817a7dfc
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-stm32mp135f-dk.in
@@ -0,0 +1,13 @@
+## SECTION=image
+
+config IMAGE_STM32MP135F_DK
+	tristate
+	select HOST_GENIMAGE
+	select HOST_TF_A
+	select IMAGE_ROOT_EXT
+	select TF_A_STM32MP13
+	select OPTEE
+	select BAREBOX_STM32MP
+	prompt "Generate images/stm32mp135f-dk.hdimg"
+	help
+	  Generate GPT image for the STM32MP135F-DK
diff --git a/configs/platform-v7a/rules/image-stm32mp135f-dk.make b/configs/platform-v7a/rules/image-stm32mp135f-dk.make
new file mode 100644
index 000000000000..c7fefb2f0432
--- /dev/null
+++ b/configs/platform-v7a/rules/image-stm32mp135f-dk.make
@@ -0,0 +1,34 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP135F_DK) += image-stm32mp135f-dk
+
+IMAGE_STM32MP135F_DK_ENV := STM32MP_BOARD=stm32mp135f-dk
+
+#
+# Paths and names
+#
+IMAGE_STM32MP135F_DK		:= image-stm32mp135f-dk
+IMAGE_STM32MP135F_DK_DIR	:= $(BUILDDIR)/$(IMAGE_STM32MP135F_DK)
+IMAGE_STM32MP135F_DK_IMAGE	:= $(IMAGEDIR)/stm32mp135f-dk.hdimg
+IMAGE_STM32MP135F_DK_FILES	:= $(IMAGEDIR)/root.tgz
+IMAGE_STM32MP135F_DK_CONFIG	:= stm32mp-optee.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+$(IMAGE_STM32MP135F_DK_IMAGE):
+	@$(call targetinfo)
+	@$(call image/genimage, IMAGE_STM32MP135F_DK)
+	@$(call finish)
+
+# vim: syntax=make
-- 
2.39.2




  parent reply	other threads:[~2024-03-15 21:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 21:12 [DistroKit] [PATCH 00/12] update and add STM32MP135F-DK support Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 01/12] ptxdist: migrate 2023.02.0 → 2024.03.0 Ahmad Fatoum
2024-03-16  9:26   ` Alexander Dahl
2024-03-17 19:14     ` Robert Schwebel
2024-03-21  9:37   ` Alexander Dahl
2024-03-25 18:45     ` [DistroKit] [PATCH] blspec-entry: remove superfluous file Roland Hieber
2024-03-25 20:51       ` Robert Schwebel
2024-03-15 21:12 ` [DistroKit] [PATCH 02/12] tf-a: update from v2.8 → v2.10 Ahmad Fatoum
2024-04-24 11:15   ` Alexander Dahl
2024-04-24 11:48     ` Ahmad Fatoum
2024-04-24 11:58       ` Alexander Dahl
2024-03-15 21:12 ` [DistroKit] [PATCH 03/12] v8a: imx8mq-evk: disable PCI nodes Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 04/12] v8a: update kernel from v6.6 → v6.8 Ahmad Fatoum
2024-03-16 11:18   ` Michael Olbrich
2024-03-16 13:09     ` Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 05/12] v8a: barebox: version bump v2023.12.0 → v2024.03.0 Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 06/12] v7a: update kernel from v6.6 → v6.8 Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 07/12] v7a: barebox: version bump v2024.01.0 → v2024.03.0 Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 08/12] v7a: barebox: enable STM32MP135F-DK support Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 09/12] v7a: build OP-TEE for STM32MP13 Ahmad Fatoum
2024-03-15 21:12 ` [DistroKit] [PATCH 10/12] v7a: stm32mp: add TF-A recipe " Ahmad Fatoum
2024-04-26  8:03   ` Alexander Dahl
2024-03-15 21:12 ` [DistroKit] [PATCH 11/12] v7a: kernel: enable STM32MP135F-DK support Ahmad Fatoum
2024-03-18 13:07   ` Michael Olbrich
2024-03-18 14:23     ` Robert Schwebel
2024-03-15 21:12 ` Ahmad Fatoum [this message]
2024-03-17 19:27 ` [DistroKit] [PATCH 00/12] update and add " Robert Schwebel

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=20240315211240.3016716-13-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=distrokit@pengutronix.de \
    /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