summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@linaro.org>2021-07-02 21:32:58 +0530
committerJose Marinho <jose.marinho@arm.com>2021-07-06 19:47:08 +0100
commit5a554a2635ff2fb90b2c65de0ecb9bf78f98663d (patch)
tree786f42e1eb94c8552737abff503bbe16ba8c1cb4
parent84dee469505f82b55f72f1f034c4e44271a8b560 (diff)
fwu: stm32mp1: Add support for building the FWU feature
Add support for enabling the FWU multi bank boot feature on the platform. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
-rw-r--r--plat/st/stm32mp1/platform.mk25
1 files changed, 25 insertions, 0 deletions
diff --git a/plat/st/stm32mp1/platform.mk b/plat/st/stm32mp1/platform.mk
index 1693135e5..d1de44bd6 100644
--- a/plat/st/stm32mp1/platform.mk
+++ b/plat/st/stm32mp1/platform.mk
@@ -24,6 +24,20 @@ endif
# Not needed for Cortex-A7
WORKAROUND_CVE_2017_5715:= 0
+ifeq (${PSA_FWU_SUPPORT},1)
+# Number of banks and images per bank
+NR_OF_FW_BANKS := 2
+NR_OF_IMAGES_IN_FW_BANK := 4
+
+# Number of TF-A copies in the device
+STM32_TF_A_COPIES := 2
+STM32_BL33_PARTS_NUM := 2
+ifeq ($(AARCH32_SP),optee)
+STM32_RUNTIME_PARTS_NUM := 6
+else
+STM32_RUNTIME_PARTS_NUM := 0
+endif
+else
# Number of TF-A copies in the device
STM32_TF_A_COPIES := 2
STM32_BL33_PARTS_NUM := 1
@@ -32,6 +46,8 @@ STM32_RUNTIME_PARTS_NUM := 3
else
STM32_RUNTIME_PARTS_NUM := 0
endif
+endif
+
PLAT_PARTITION_MAX_ENTRIES := $(shell echo $$(($(STM32_TF_A_COPIES) + \
$(STM32_BL33_PARTS_NUM) + \
$(STM32_RUNTIME_PARTS_NUM))))
@@ -156,6 +172,15 @@ BL2_SOURCES += drivers/mmc/mmc.c \
drivers/st/mmc/stm32_sdmmc2.c
endif
+
+ifeq (${PSA_FWU_SUPPORT},1)
+include lib/zlib/zlib.mk
+
+BL2_SOURCES += $(ZLIB_SOURCES)
+
+BL2_SOURCES += drivers/fwu/fwu.c
+endif
+
ifeq (${STM32MP_RAW_NAND},1)
$(eval $(call add_define_val,NAND_ONFI_DETECT,1))
BL2_SOURCES += drivers/mtd/nand/raw_nand.c \