From 3395bd12bcd7595b66902c0fc70ffee0a4681eea Mon Sep 17 00:00:00 2001 From: Boyan Karatotev Date: Tue, 11 Feb 2025 16:28:00 +0000 Subject: [PATCH 1/2] fix(armada): don't race on the UART_IMAGE UART_IMAGE is not set when WTP isn't. The error rules will then provide a recipe for $(BUILD_PLAT). When building with a lot of cores (64) this rule might be called before the directory is made, causing a build failure. Hoist the definition so that the depended path is correct. Change-Id: I167e7398e576e667d0c5c1fc0f07ab8c8ef939a8 Signed-off-by: Boyan Karatotev --- plat/marvell/armada/a3k/common/a3700_common.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/marvell/armada/a3k/common/a3700_common.mk b/plat/marvell/armada/a3k/common/a3700_common.mk index e8f892d2c..ac47ef522 100644 --- a/plat/marvell/armada/a3k/common/a3700_common.mk +++ b/plat/marvell/armada/a3k/common/a3700_common.mk @@ -74,6 +74,9 @@ ifeq ($(A3720_DB_PM_WAKEUP_SRC),1) BL31_SOURCES += $(PLAT_FAMILY_BASE)/$(PLAT)/board/pm_src.c endif +BUILD_UART := uart-images +UART_IMAGE := $(BUILD_UART).tgz.bin + ifdef WTP # Do not remove! Following checks are required to ensure correct TF-A builds, removing these checks leads to broken TF-A builds @@ -82,9 +85,6 @@ $(if $(shell git -C $(value WTP) rev-parse --show-cdup 2>&1),$(error "'WTP=$(val TBB := $(WTP)/wtptp/src/TBB_Linux/release/TBB_linux -BUILD_UART := uart-images -UART_IMAGE := $(BUILD_UART).tgz.bin - ifeq ($(MARVELL_SECURE_BOOT),1) TIM_CFG := $(BUILD_PLAT)/atf-tim.txt TIM_UART_CFG := $(BUILD_PLAT)/$(BUILD_UART)/atf-tim.txt From 9855568cc5ab8af9a8bee54fcc35112240e16b28 Mon Sep 17 00:00:00 2001 From: Boyan Karatotev Date: Tue, 11 Feb 2025 16:33:29 +0000 Subject: [PATCH 2/2] fix(arm): don't race on the build directory Wait for it to have been created. This is the same issue as commit db69d118294f08aae86378c98aa082ac73e15b73. Change-Id: I32bd0c713e2837563d32131fb0beddb5533c0792 Signed-off-by: Boyan Karatotev --- plat/arm/board/common/board_common.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plat/arm/board/common/board_common.mk b/plat/arm/board/common/board_common.mk index 889b8b353..3a6637f65 100644 --- a/plat/arm/board/common/board_common.mk +++ b/plat/arm/board/common/board_common.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2015-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -148,14 +148,14 @@ $(BUILD_PLAT)/bl2/arm_dev_protpk.o: $(ARM_PROTPK) $(BUILD_PLAT)/bl2/arm_dev_swd_rotpk.o: $(ARM_SWD_ROTPK) endif -$(ARM_PROTPK): $(ARM_PROT_KEY) +$(ARM_PROTPK): $(ARM_PROT_KEY) | $$(@D)/ ifndef ARM_PROT_KEY $(error Cannot generate hash: no PROT_KEY defined) endif ${OPENSSL_BIN_PATH}/openssl ${CRYPTO_ALG} -in ${ARM_PROT_KEY} -pubout -outform DER | \ ${OPENSSL_BIN_PATH}/openssl dgst -${HASH_ALG} -binary -out $@ -$(ARM_SWD_ROTPK): $(ARM_SWD_ROT_KEY) +$(ARM_SWD_ROTPK): $(ARM_SWD_ROT_KEY) | $$(@D)/ ifndef ARM_SWD_ROT_KEY $(error Cannot generate hash: no SWD_KEY defined) endif