From 2268b3b750cd009992de4173f5d2fa8640f5a8de Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 29 Jun 2015 22:13:53 +0200 Subject: arch/arm64: Avoid race condition when building bl31 The arm-trusted-firmware build system may not create the final bl31.elf file atomically, confusing our make to try to use it before it's ready. Hence insert a (hopefully, but not guaranteed to be atomic) file move. Change-Id: Iffc80467e0f4bbc96fc62414d4abfaa7b42634f4 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/10700 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) --- src/arch/arm64/Makefile.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/arch/arm64/Makefile.inc') diff --git a/src/arch/arm64/Makefile.inc b/src/arch/arm64/Makefile.inc index 86d6f7dce6..4cf012a358 100644 --- a/src/arch/arm64/Makefile.inc +++ b/src/arch/arm64/Makefile.inc @@ -195,12 +195,12 @@ BL31_MAKEARGS += DEBUG=1 endif # CONFIG_CONSOLE_SERIAL # Avoid build/release|build/debug distinction by overriding BUILD_PLAT directly -BL31_MAKEARGS += BUILD_PLAT="$(top)/$(obj)/3rdparty/arm-trusted-firmware" +BL31_MAKEARGS += BUILD_PLAT="$(abspath $(obj)/3rdparty/arm-trusted-firmware)" BL31_CFLAGS := -fno-pic -fno-stack-protector BL31_LDFLAGS := --emit-relocs -BL31 := $(obj)/3rdparty/arm-trusted-firmware/bl31/bl31.elf +BL31 := $(obj)/bl31.elf $(BL31): @printf " MAKE $(subst $(obj)/,,$(@))\n" @@ -208,6 +208,7 @@ $(BL31): CFLAGS="$(BL31_CFLAGS)" \ LDFLAGS="$(BL31_LDFLAGS)" \ $(MAKE) -C $(BL31_SOURCE) $(BL31_MAKEARGS) bl31 + mv $(obj)/3rdparty/arm-trusted-firmware/bl31/bl31.elf $@ .PHONY: $(BL31) -- cgit v1.2.3