aboutsummaryrefslogtreecommitdiff
path: root/plat/marvell/armada
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-07-11 17:33:37 +0200
committerPali Rohár <pali@kernel.org>2021-07-11 17:35:35 +0200
commitd3f8db07b618e79c05805a1598e5e834e42fea98 (patch)
tree3768a0549466dea30c374f01f08dc37f2c100358 /plat/marvell/armada
parent618287dac61f083e6bc896f9362adb2ad207c74b (diff)
downloadarm-trusted-firmware-d3f8db07b618e79c05805a1598e5e834e42fea98.tar.gz
fix(plat/marvell/a3k): Fix building uart-images.tgz.bin archive
For UART secure boot it is required also TIMN image, so pack it into uart-images.tgz.bin archive which is created by mrvl_uart target. $(TIMN_IMAGE) and $(TIM_IMAGE) variables are used only for UART images so their content needs to be initialized from $(TIMN_UART_CFG) and $(TIM_UART_CFG) config files. And not from $(TIMN_CFG) and $(TIM_CFG) as it is now because they are not generated during mrvl_uart target. Fix it to allow building mrvl_uart target before mrvl_flash target. To match usage of these variables, rename them to $(TIMN_UART_IMAGE) and $(TIM_UART_IMAGE). To not complicate rule for building uart-images.tgz.bin archive, set list of image files into a new $(UART_IMAGES) variable. Signed-off-by: Pali Rohár <pali@kernel.org> Change-Id: I83b980abb4047a3afb3ce3026842e1d873c490bf
Diffstat (limited to 'plat/marvell/armada')
-rw-r--r--plat/marvell/armada/a3k/common/a3700_common.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/plat/marvell/armada/a3k/common/a3700_common.mk b/plat/marvell/armada/a3k/common/a3700_common.mk
index a89b3a50e..0a8974293 100644
--- a/plat/marvell/armada/a3k/common/a3700_common.mk
+++ b/plat/marvell/armada/a3k/common/a3700_common.mk
@@ -89,7 +89,7 @@ TIMN_CFG := $(BUILD_PLAT)/atf-timN.txt
TIMN_UART_CFG := $(BUILD_PLAT)/$(BUILD_UART)/atf-timN.txt
TIMN_SIG := $(IMAGESPATH)/timnsign.txt
TIM2IMGARGS := -i $(TIM_CFG) -n $(TIMN_CFG)
-TIMN_IMAGE := $$(grep "Image Filename:" -m 1 $(TIMN_CFG) | cut -c 17-)
+TIMN_UART_IMAGE := $$(grep "Image Filename:" -m 1 $(TIMN_UART_CFG) | cut -c 17-)
else #MARVELL_SECURE_BOOT
TIM_CFG := $(BUILD_PLAT)/atf-ntim.txt
TIM_UART_CFG := $(BUILD_PLAT)/$(BUILD_UART)/atf-ntim.txt
@@ -97,6 +97,8 @@ IMAGESPATH := $(WTP)/tim/untrusted
TIM2IMGARGS := -i $(TIM_CFG)
endif #MARVELL_SECURE_BOOT
+TIM_UART_IMAGE := $$(grep "Image Filename:" -m 1 $(TIM_UART_CFG) | cut -c 17-)
+
TIMBUILD := $(WTP)/script/buildtim.sh
TIM2IMG := $(WTP)/script/tim2img.pl
TIMDDRTOOL := $(WTP)/tim/ddr/ddr_tool
@@ -123,12 +125,17 @@ DDR_TOPOLOGY ?= 0
BOOTDEV ?= SPINOR
PARTNUM ?= 0
-TIM_IMAGE := $$(grep "Image Filename:" -m 1 $(TIM_CFG) | cut -c 17-)
TIMBLDARGS := $(MARVELL_SECURE_BOOT) $(BOOTDEV) $(IMAGESPATH) $(WTP) $(CLOCKSPRESET) \
$(DDR_TOPOLOGY) $(PARTNUM) $(DEBUG) $(TIM_CFG) $(TIMN_CFG) $(TIMN_SIG) 1
TIMBLDUARTARGS := $(MARVELL_SECURE_BOOT) UART $(IMAGESPATH) $(WTP) $(CLOCKSPRESET) \
$(DDR_TOPOLOGY) 0 0 $(TIM_UART_CFG) $(TIMN_UART_CFG) $(TIMN_SIG) 0
+UART_IMAGES := $(BUILD_UART)/$(TIM_UART_IMAGE)
+ifeq ($(MARVELL_SECURE_BOOT),1)
+UART_IMAGES += $(BUILD_UART)/$(TIMN_UART_IMAGE)
+endif
+UART_IMAGES += $(BUILD_UART)/wtmi_h.bin $(BUILD_UART)/boot-image_h.bin
+
CRYPTOPP_LIBDIR ?= $(CRYPTOPP_PATH)
CRYPTOPP_INCDIR ?= $(CRYPTOPP_PATH)
@@ -171,7 +178,7 @@ endif
ifeq ($(MARVELL_SECURE_BOOT),1)
$(Q)cd $(BUILD_PLAT)/$(BUILD_UART) && $(TBB) -r $(TIMN_UART_CFG)
endif
- $(Q)tar czf $(BUILD_PLAT)/$(UART_IMAGE) -C $(BUILD_PLAT) $(BUILD_UART)/$(TIM_IMAGE) $(BUILD_UART)/wtmi_h.bin $(BUILD_UART)/boot-image_h.bin
+ $(Q)tar czf $(BUILD_PLAT)/$(UART_IMAGE) -C $(BUILD_PLAT) $(UART_IMAGES)
@$(ECHO_BLANK_LINE)
@echo "Built $@ successfully"
@$(ECHO_BLANK_LINE)