Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10700
-gerrit
commit 0e3320586eb35859e3b44971194be71b315e95b5 Author: Patrick Georgi pgeorgi@chromium.org Date: Mon Jun 29 22:13:53 2015 +0200
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 pgeorgi@chromium.org --- src/arch/arm64/Makefile.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/arch/arm64/Makefile.inc b/src/arch/arm64/Makefile.inc index 86d6f7d..4cf012a 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)