From 9ec0fee664187cd7e6dcb17f4016a5ce32f437c6 Mon Sep 17 00:00:00 2001 From: Neal Frager Date: Fri, 5 Sep 2025 13:26:03 +0100 Subject: [PATCH] boot/arm-trusted-firmware: override BL31 environment variable error When building the arm-trusted-firmware, if the host environment has a value configured in the BL31 variable such as the following: export BL31=/tmp/bl31.elf This will cause the build of the bl31.elf to be skipped leading to the following build error: make[1]: Nothing to be done for 'bl31'. And then: readelf: Error: './output/build/arm-trusted-firmware-custom/build/versal/release/bl31/bl31.elf': No such file To fix this, clear the BL31 variable in the MAKE_OPTS, so that building the arm-trusted-firmware will build regardless of the host environment. Signed-off-by: Neal Frager Tested-by: Luca Ceresoli Reviewed-by: Luca Ceresoli Signed-off-by: Thomas Petazzoni (cherry picked from commit 6019df8f99cb30efd6263b93753bd8bc46874b48) Signed-off-by: Thomas Perale --- boot/arm-trusted-firmware/arm-trusted-firmware.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index 172a930b5c..decfd4748f 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -162,6 +162,8 @@ endif ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31),y) ARM_TRUSTED_FIRMWARE_MAKE_TARGETS += bl31 +# Avoid BL31 environment variable from polluting the build +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL31= endif ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT),y)