[U-Boot] [PATCH 1/1] efi_loader: avoid make race condition

Heinrich Schuchardt xypron.glpk at gmx.de
Sun May 27 20:28:53 UTC 2018


When building .efi targets a race condition was observed:

If %_efi.so is not yet built before trying to build %.efi and error
*** No rule to make target '%.efi'
occurs. By explicitly adding %_efi.so to the targets this is avoided.

Reported-by: Tuomas Tynkkynen <tuomas.tynkkynen at iki.fi>
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
Hello Tuomas,

please, test if this resolves your problem.

Best regards

Heinrich
---
 lib/efi_loader/Makefile   | 4 +++-
 lib/efi_selftest/Makefile | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
index c6046e36d26..d31393c7a28 100644
--- a/lib/efi_loader/Makefile
+++ b/lib/efi_loader/Makefile
@@ -10,7 +10,9 @@ CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
 CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI) -Os
 
 ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
-always += helloworld.efi
+always-y += \
+helloworld_efi.so \
+helloworld.efi
 endif
 
 obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o
diff --git a/lib/efi_selftest/Makefile b/lib/efi_selftest/Makefile
index 4fe404d88d8..2aeaa2e0f66 100644
--- a/lib/efi_selftest/Makefile
+++ b/lib/efi_selftest/Makefile
@@ -52,6 +52,8 @@ efi_selftest_startimage_return.o
 targets += \
 efi_miniapp_file_image_exit.h \
 efi_miniapp_file_image_return.h \
+efi_selftest_miniapp_exit_efi.so \
+efi_selftest_miniapp_return_efi.so \
 efi_selftest_miniapp_exit.efi \
 efi_selftest_miniapp_return.efi
 
-- 
2.17.0



More information about the U-Boot mailing list