From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH 6/8] v7a: tf-a: switch to FIP image
Date: Mon, 25 Jul 2022 14:04:43 +0200 [thread overview]
Message-ID: <20220725120445.1295669-6-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220725120445.1295669-1-a.fatoum@pengutronix.de>
We have everything in place now to switch from stm32image to FIP.
This gives us upstream support for factory bootstrap via DFU and
avoids the breakage on v2.8, which will be the first release removing
support of the deprecated stm32image format.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
.../platform-v7a/config/images/stm32mp.config | 19 +++++++++++++++----
configs/platform-v7a/platformconfig | 3 ++-
.../platform-v7a/platforms/image-lxa-mc1.in | 1 +
.../platforms/image-stm32mp157c-dk2.in | 1 +
.../platforms/image-stm32mp157c-ev1.in | 1 +
.../platform-v7a/rules/barebox-stm32mp.make | 4 +---
configs/platform-v7a/rules/image-lxa-mc1.make | 4 +---
.../rules/image-stm32mp157c-dk2.make | 4 +---
.../rules/image-stm32mp157c-ev1.make | 4 +---
9 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
index eb6065c64c1a..52d0d0e8aa97 100644
--- a/configs/platform-v7a/config/images/stm32mp.config
+++ b/configs/platform-v7a/config/images/stm32mp.config
@@ -5,15 +5,15 @@ image @IMAGE@ {
gpt-no-backup = true
}
partition fsbl1 {
- image = "stm32mp1-tf-a-@STM32MP_BOARD_FSBL@.stm32"
+ image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
size = 256K
}
partition fsbl2 {
- image = "stm32mp1-tf-a-@STM32MP_BOARD_FSBL@.stm32"
+ image = "stm32mp1-tf-a-@STM32MP_BOARD@.stm32"
size = 256K
}
- partition ssbl {
- image = "barebox-@STM32MP_BOARD_SSBL@.img"
+ partition fip {
+ image = "@STM32MP_BOARD@.fip"
size = 1M
}
partition barebox-environment {
@@ -26,4 +26,15 @@ image @IMAGE@ {
size = 100M
}
}
+
+image @STM32MP_BOARD@.fip {
+ fip {
+ fw-config = "stm32mp1-@STM32MP_BOARD@-fw-config.dtb"
+ hw-config = "barebox-@STM32MP_BOARD@.dtb"
+ nt-fw = "barebox-stm32mp-generic-bl33.img"
+ tos-fw = { "stm32mp1-bl32.bin" }
+ tos-fw-config = "stm32mp1-@STM32MP_BOARD@-bl32.dtb"
+ }
+ size = 1M
+}
/* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 1444356360ac..5b5c8bc383fe 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -204,7 +204,7 @@ PTXCONF_TF_A_ARM_ARCH_MAJOR_7=y
# PTXCONF_TF_A_ARM_ARCH_MAJOR_8_32_BIT is not set
PTXCONF_TF_A_ARM_ARCH_MAJOR=7
PTXCONF_TF_A_PLATFORMS="stm32mp1"
-PTXCONF_TF_A_EXTRA_ARGS="DTB_FILE_NAME='stm32mp157c-dk2.dtb stm32mp157c-ev1.dtb stm32mp157c-lxa-mc1.dtb' STM32MP_EMMC=1 STM32MP_SDMMC=1 STM32MP_USE_STM32IMAGE=1"
+PTXCONF_TF_A_EXTRA_ARGS="DTB_FILE_NAME='stm32mp157c-dk2.dtb stm32mp157c-ev1.dtb stm32mp157c-lxa-mc1.dtb' STM32MP_EMMC=1 STM32MP_SDMMC=1 STM32MP_USB_PROGRAMMER=1"
PTXCONF_TF_A_ARTIFACTS="tf-a-*.stm32 bl32.bin fdts/*-fw-config.dtb fdts/*-bl32.dtb"
#
@@ -316,6 +316,7 @@ PTXCONF_HOST_M4=y
PTXCONF_HOST_MTOOLS=y
PTXCONF_HOST_SYSTEM_BC=y
PTXCONF_HOST_UTIL_LINUX_NG=y
+PTXCONF_HOST_TF_A=y
#
# non-free firmware blobs
diff --git a/configs/platform-v7a/platforms/image-lxa-mc1.in b/configs/platform-v7a/platforms/image-lxa-mc1.in
index baae9c47edd4..affb04eed9de 100644
--- a/configs/platform-v7a/platforms/image-lxa-mc1.in
+++ b/configs/platform-v7a/platforms/image-lxa-mc1.in
@@ -3,6 +3,7 @@
config IMAGE_LXA_MC1
tristate
select HOST_GENIMAGE
+ select HOST_TF_A
select IMAGE_ROOT_EXT
select BAREBOX_STM32MP
select TF_A
diff --git a/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
index d7b9c235edaa..d146b96bac70 100644
--- a/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
+++ b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
@@ -3,6 +3,7 @@
config IMAGE_STM32MP157C_DK2
tristate
select HOST_GENIMAGE
+ select HOST_TF_A
select IMAGE_ROOT_EXT
select BAREBOX_STM32MP
select TF_A
diff --git a/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in b/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in
index d0b60a4956c4..7bc91af9e34c 100644
--- a/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in
+++ b/configs/platform-v7a/platforms/image-stm32mp157c-ev1.in
@@ -3,6 +3,7 @@
config IMAGE_STM32MP157C_EV1
tristate
select HOST_GENIMAGE
+ select HOST_TF_A
select IMAGE_ROOT_EXT
select BAREBOX_STM32MP
select TF_A
diff --git a/configs/platform-v7a/rules/barebox-stm32mp.make b/configs/platform-v7a/rules/barebox-stm32mp.make
index aeb141f2729b..24df76194860 100644
--- a/configs/platform-v7a/rules/barebox-stm32mp.make
+++ b/configs/platform-v7a/rules/barebox-stm32mp.make
@@ -45,9 +45,7 @@ BAREBOX_STM32MP_CONF_OPT := \
BAREBOX_STM32MP_MAKE_OPT := $(BAREBOX_STM32MP_CONF_OPT)
BAREBOX_STM32MP_IMAGES := \
- images/barebox-stm32mp15xx-dkx.img \
- images/barebox-stm32mp15x-ev1.img \
- images/barebox-stm32mp157c-lxa-mc1.img
+ images/barebox-stm32mp-generic-bl33.img
BAREBOX_STM32MP_FIP_DTBS := \
stm32mp157c-dk2.dtb \
diff --git a/configs/platform-v7a/rules/image-lxa-mc1.make b/configs/platform-v7a/rules/image-lxa-mc1.make
index 058a9d100e11..333a5f606104 100644
--- a/configs/platform-v7a/rules/image-lxa-mc1.make
+++ b/configs/platform-v7a/rules/image-lxa-mc1.make
@@ -11,9 +11,7 @@
#
IMAGE_PACKAGES-$(PTXCONF_IMAGE_LXA_MC1) += image-lxa-mc1
-IMAGE_LXA_MC1_ENV := \
- STM32MP_BOARD_FSBL=stm32mp157c-lxa-mc1 \
- STM32MP_BOARD_SSBL=stm32mp157c-lxa-mc1
+IMAGE_LXA_MC1_ENV := STM32MP_BOARD=stm32mp157c-lxa-mc1
#
# Paths and names
diff --git a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
index 7c0f4424936a..fb14c7a95fa9 100644
--- a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
+++ b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
@@ -11,9 +11,7 @@
#
IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_DK2) += image-stm32mp157c-dk2
-IMAGE_STM32MP157C_DK2_ENV := \
- STM32MP_BOARD_FSBL=stm32mp157c-dk2 \
- STM32MP_BOARD_SSBL=stm32mp15xx-dkx
+IMAGE_STM32MP157C_DK2_ENV := STM32MP_BOARD=stm32mp157c-dk2
#
# Paths and names
diff --git a/configs/platform-v7a/rules/image-stm32mp157c-ev1.make b/configs/platform-v7a/rules/image-stm32mp157c-ev1.make
index 862ea5a866ce..297b0f639c7b 100644
--- a/configs/platform-v7a/rules/image-stm32mp157c-ev1.make
+++ b/configs/platform-v7a/rules/image-stm32mp157c-ev1.make
@@ -11,9 +11,7 @@
#
IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_EV1) += image-stm32mp157c-ev1
-IMAGE_STM32MP157C_EV1_ENV := \
- STM32MP_BOARD_FSBL=stm32mp157c-ev1 \
- STM32MP_BOARD_SSBL=stm32mp15x-ev1
+IMAGE_STM32MP157C_EV1_ENV := STM32MP_BOARD=stm32mp157c-ev1
#
# Paths and names
--
2.30.2
next prev parent reply other threads:[~2022-07-25 12:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 12:04 [DistroKit] [PATCH 1/8] v7a: tf-a: don't compile in unused NAND/NOR boot in FSBL Ahmad Fatoum
2022-07-25 12:04 ` [DistroKit] [PATCH 2/8] v7a: tf-a: update to v2.7 Ahmad Fatoum
2022-07-25 12:04 ` [DistroKit] [PATCH 3/8] genimage: patch in Firmware Image Package (FIP) support Ahmad Fatoum
2022-09-05 14:28 ` Robert Schwebel
2022-07-25 12:04 ` [DistroKit] [PATCH 4/8] v7a: barebox-stm32mp: start collecting device tree blobs Ahmad Fatoum
2022-07-25 12:04 ` [DistroKit] [PATCH 5/8] v7a: tf-a: start collecting FIP image components Ahmad Fatoum
2022-07-25 12:04 ` Ahmad Fatoum [this message]
2022-07-25 12:04 ` [DistroKit] [PATCH 7/8] v7a: barebox: update v2022.04.0 → v2022.06.0 Ahmad Fatoum
2022-07-25 12:04 ` [DistroKit] [PATCH 8/8] v7a: barebox: ignore card-detect for booted SD-Card Ahmad Fatoum
2022-09-05 13:51 ` [DistroKit] [PATCH 1/8] v7a: tf-a: don't compile in unused NAND/NOR boot in FSBL 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=20220725120445.1295669-6-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