feat(st): add FWU configurations
Test Firmware Update configurations (with PSA_FWU_SUPPORT=1).
Add one FWU config for STM32MP15 on SD-card.
To avoid adding too much configurations, update all STM32MP13 configs
to use FWU and change STM32MP15 boot on raw NAND to use it as well,
as there is some dedicated code for this use case.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I4deb3fe3ca79a45ac7b95c976f44fcd457d4872b
diff --git a/group/tf-l1-build-plat/stm32mp1-fwu:nil b/group/tf-l1-build-plat/stm32mp1-fwu:nil
new file mode 100644
index 0000000..f5c5dc1
--- /dev/null
+++ b/group/tf-l1-build-plat/stm32mp1-fwu:nil
@@ -0,0 +1,6 @@
+#
+# Copyright (C) 2024, STMicroelectronics - All Rights Reserved
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
diff --git a/script/tf-coverity/tf-cov-make b/script/tf-coverity/tf-cov-make
index 45140a1..02c69c7 100755
--- a/script/tf-coverity/tf-cov-make
+++ b/script/tf-coverity/tf-cov-make
@@ -653,6 +653,12 @@
BUILD_PLAT=build/stm32mp1-sdmmc/debug \
bl2
+# STM32MP1 SDMMC boot BL2 with OP-TEE & FWU
+make ${stm32mp1_common_flags} STM32MP_SDMMC=1 \
+ BUILD_PLAT=build/stm32mp1-sdmmc/debug \
+ PSA_FWU_SUPPORT=1 AARCH32_SP=optee \
+ bl2
+
# STM32MP1 eMMC boot
make ${stm32mp1_common_flags} STM32MP_EMMC=1 \
BUILD_PLAT=build/stm32mp1-emmc/debug \
@@ -661,7 +667,8 @@
# STM32MP1 Raw NAND boot
make ${stm32mp1_common_flags} STM32MP_RAW_NAND=1 \
BUILD_PLAT=build/stm32mp1-nand/debug \
- AARCH32_SP=sp_min bl2 bl32
+ PSA_FWU_SUPPORT=1 AARCH32_SP=optee \
+ bl2
# STM32MP1 SPI NAND boot
make ${stm32mp1_common_flags} STM32MP_SPI_NAND=1 \
@@ -691,12 +698,18 @@
stm32mp13_common_flags="${stm32mp1_common_flags} \
AARCH32_SP=optee \
+ PSA_FWU_SUPPORT=1 \
STM32MP13=1"
# STM32MP13 SDMMC boot
make ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
BUILD_PLAT=build/stm32mp1-mp13-sdmmc/debug bl2
+# STM32MP13 SDMMC boot with FWU
+make ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
+ PSA_FWU_SUPPORT=1 \
+ BUILD_PLAT=build/stm32mp1-mp13-sdmmc/debug bl2
+
# STM32MP13 TBBR
make ${stm32mp13_common_flags} STM32MP_SDMMC=1 \
MBEDTLS_DIR=$(pwd)/mbedtls TRUSTED_BOARD_BOOT=1 \
diff --git a/tf_config/stm32mp1-fwu b/tf_config/stm32mp1-fwu
new file mode 100644
index 0000000..20c5cd5
--- /dev/null
+++ b/tf_config/stm32mp1-fwu
@@ -0,0 +1,9 @@
+AARCH32_SP=sp_min
+ARCH=aarch32
+ARM_ARCH_MAJOR=7
+CROSS_COMPILE=arm-none-eabi-
+DTB_FILE_NAME=stm32mp157c-ev1.dtb
+PLAT=stm32mp1
+PSA_FWU_SUPPORT=1
+STM32MP_EMMC=1
+STM32MP_SDMMC=1
diff --git a/tf_config/stm32mp1-mp13 b/tf_config/stm32mp1-mp13
index 489e9a0..4247300 100644
--- a/tf_config/stm32mp1-mp13
+++ b/tf_config/stm32mp1-mp13
@@ -2,8 +2,9 @@
ARCH=aarch32
ARM_ARCH_MAJOR=7
CROSS_COMPILE=arm-none-eabi-
+DTB_FILE_NAME=stm32mp135f-dk.dtb
PLAT=stm32mp1
+PSA_FWU_SUPPORT=1
STM32MP13=1
STM32MP_EMMC=1
STM32MP_SDMMC=1
-DTB_FILE_NAME=stm32mp135f-dk.dtb
diff --git a/tf_config/stm32mp1-mp13-tbb b/tf_config/stm32mp1-mp13-tbb
index f8b295d..fd91f0c 100644
--- a/tf_config/stm32mp1-mp13-tbb
+++ b/tf_config/stm32mp1-mp13-tbb
@@ -2,9 +2,10 @@
ARCH=aarch32
ARM_ARCH_MAJOR=7
CROSS_COMPILE=arm-none-eabi-
+DTB_FILE_NAME=stm32mp135f-dk.dtb
PLAT=stm32mp1
+PSA_FWU_SUPPORT=1
STM32MP13=1
STM32MP_EMMC=1
STM32MP_SDMMC=1
-DTB_FILE_NAME=stm32mp135f-dk.dtb
TRUSTED_BOARD_BOOT=1
diff --git a/tf_config/stm32mp1-mp13-tbb-decrypt b/tf_config/stm32mp1-mp13-tbb-decrypt
index 9755e40..46467ca 100644
--- a/tf_config/stm32mp1-mp13-tbb-decrypt
+++ b/tf_config/stm32mp1-mp13-tbb-decrypt
@@ -6,6 +6,7 @@
DTB_FILE_NAME=stm32mp135f-dk.dtb
ENCRYPT_BL32=1
PLAT=stm32mp1
+PSA_FWU_SUPPORT=1
STM32MP13=1
STM32MP_EMMC=1
STM32MP_SDMMC=1
diff --git a/tf_config/stm32mp1-mp13-tbb-ecdsa-regular b/tf_config/stm32mp1-mp13-tbb-ecdsa-regular
index 9a771ca..a94d3f8 100644
--- a/tf_config/stm32mp1-mp13-tbb-ecdsa-regular
+++ b/tf_config/stm32mp1-mp13-tbb-ecdsa-regular
@@ -2,10 +2,11 @@
ARCH=aarch32
ARM_ARCH_MAJOR=7
CROSS_COMPILE=arm-none-eabi-
+DTB_FILE_NAME=stm32mp135f-dk.dtb
+KEY_ALG=ecdsa-brainpool-regular
PLAT=stm32mp1
+PSA_FWU_SUPPORT=1
STM32MP13=1
STM32MP_EMMC=1
STM32MP_SDMMC=1
-DTB_FILE_NAME=stm32mp135f-dk.dtb
TRUSTED_BOARD_BOOT=1
-KEY_ALG=ecdsa-brainpool-regular
diff --git a/tf_config/stm32mp1-mp13-tbb-ecdsa-twisted b/tf_config/stm32mp1-mp13-tbb-ecdsa-twisted
index 991a167..775be1f 100644
--- a/tf_config/stm32mp1-mp13-tbb-ecdsa-twisted
+++ b/tf_config/stm32mp1-mp13-tbb-ecdsa-twisted
@@ -2,10 +2,11 @@
ARCH=aarch32
ARM_ARCH_MAJOR=7
CROSS_COMPILE=arm-none-eabi-
+DTB_FILE_NAME=stm32mp135f-dk.dtb
+KEY_ALG=ecdsa-brainpool-twisted
PLAT=stm32mp1
+PSA_FWU_SUPPORT=1
STM32MP13=1
STM32MP_EMMC=1
STM32MP_SDMMC=1
-DTB_FILE_NAME=stm32mp135f-dk.dtb
TRUSTED_BOARD_BOOT=1
-KEY_ALG=ecdsa-brainpool-twisted
diff --git a/tf_config/stm32mp1-raw-nand b/tf_config/stm32mp1-raw-nand
index de4dcd6..2449e90 100644
--- a/tf_config/stm32mp1-raw-nand
+++ b/tf_config/stm32mp1-raw-nand
@@ -2,6 +2,7 @@
ARCH=aarch32
ARM_ARCH_MAJOR=7
CROSS_COMPILE=arm-none-eabi-
-PLAT=stm32mp1
-STM32MP_RAW_NAND=1
DTB_FILE_NAME=stm32mp157c-ev1.dtb
+PLAT=stm32mp1
+PSA_FWU_SUPPORT=1
+STM32MP_RAW_NAND=1