From f15f1c6270d50e06eafb4202dd32326d516960f3 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Thu, 14 Nov 2024 09:44:44 +0100 Subject: [PATCH] fix(stm32mp2): use TOOL_ADD_IMG_PAYLOAD for BL31 DT Use TOOL_ADD_IMG_PAYLOAD instead of TOOL_ADD_IMG to generate the BL31 device tree blob to be included in FIP. This allows building all TF-A binaries and FIP in a single command. Else, as TOOL_ADD_IMG evaluate the existence of the file before building it, we have a build error. Signed-off-by: Yann Gautier Change-Id: I72d2f70733c49792d0321ad07f5a3bbd283a36d4 --- plat/st/stm32mp2/platform.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plat/st/stm32mp2/platform.mk b/plat/st/stm32mp2/platform.mk index 2a9b6fd79..f46165623 100644 --- a/plat/st/stm32mp2/platform.mk +++ b/plat/st/stm32mp2/platform.mk @@ -74,10 +74,13 @@ STM32MP_DDR_FW_NAME := ${DDR_TYPE}_pmu_train.bin STM32MP_DDR_FW := ${STM32MP_DDR_FW_PATH}/${STM32MP_DDR_FW_NAME} endif FDT_SOURCES += $(addprefix fdts/, $(patsubst %.dtb,%.dts,$(STM32MP_FW_CONFIG_NAME))) + # Add the FW_CONFIG to FIP and specify the same to certtool $(eval $(call TOOL_ADD_PAYLOAD,${STM32MP_FW_CONFIG},--fw-config)) + # Add the SOC_FW_CONFIG to FIP and specify the same to certtool -$(eval $(call TOOL_ADD_IMG,STM32MP_SOC_FW_CONFIG,--soc-fw-config)) +$(eval $(call TOOL_ADD_IMG_PAYLOAD,STM32MP_SOC_FW_CONFIG,$(STM32MP_SOC_FW_CONFIG),--soc-fw-config,$(patsubst %.dtb,%.dts,$(STM32MP_SOC_FW_CONFIG)))) + ifeq (${STM32MP_DDR_FIP_IO_STORAGE},1) # Add the FW_DDR to FIP and specify the same to certtool $(eval $(call TOOL_ADD_IMG,STM32MP_DDR_FW,--ddr-fw)) @@ -219,6 +222,4 @@ ${BUILD_PLAT}/fdts/%-bl31.dts: fdts/%.dts fdts/${BL31_DTSI} | $$(@D)/ @echo '#include "$(patsubst fdts/%,%,$<)"' > $@ @echo '#include "${BL31_DTSI}"' >> $@ -${BUILD_PLAT}/fdts/%-bl31.dtb: ${BUILD_PLAT}/fdts/%-bl31.dts - include plat/st/common/common_rules.mk