summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2018-07-26 10:04:09 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-30 00:02:52 +0100
commite4f158a4610a77886b3dcd641fbfc5959ed58f40 (patch)
tree8dfe36529006cc53b951641b6f06c227c4816dda
parentb136c92b29a2a104ec88bf1a87bb5a863015659f (diff)
downloadpoky-e4f158a4610a77886b3dcd641fbfc5959ed58f40.tar.gz
u-boot: Fix build race condition
Backports 2f61b13d6acba787b00598d519c85222e993e4ca (included in the 2018.07 release) which fixes a race condition when building. [YOCTO #12705] (From OE-Core rev: 77586b8e1e50234f34b6c469c41819e36cc8a786) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch51
-rw-r--r--meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch b/meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch
new file mode 100644
index 0000000000..da7e27c64c
--- /dev/null
+++ b/meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch
@@ -0,0 +1,51 @@
1From 5c2e24a9ed54dfee77d1844a080e998b4affe916 Mon Sep 17 00:00:00 2001
2From: Heinrich Schuchardt <xypron.glpk@gmx.de>
3Date: Sat, 2 Jun 2018 19:00:41 +0200
4Subject: [PATCH] efi_loader: avoid make race condition
5
6When U-Boot is built with 'make -j' there is not guarantee that targets in
7directory arch/ are built before targets in directory lib/. The current
8build instruction for EFI binaries in lib/ rely on dependencies in arch/.
9If $(EFI_CRT0) or $(EFI_RELOC) is not yet built before trying to build
10%.efi an error
11 *** No rule to make target '%.efi'
12occurs.
13
14With the patch separate copies of $(EFI_CRT0) and $(EFI_RELOC) named
15efi_crt0.o and efi_reloc.o are built in lib/efi_loader and
16lib/efi_selftest.
17
18Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
19Signed-off-by: Alexander Graf <agraf@suse.de>
20
21Upstream-Status: Backport from 2018.07
22
23Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
24---
25 scripts/Makefile.lib | 10 ++++++++--
26 1 file changed, 8 insertions(+), 2 deletions(-)
27
28diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
29index 8f19b2db56..f2f398c935 100644
30--- a/scripts/Makefile.lib
31+++ b/scripts/Makefile.lib
32@@ -404,8 +404,14 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \
33
34 EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)
35
36-$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \
37- arch/$(ARCH)/lib/$(EFI_RELOC)
38+$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S)
39+ $(call if_changed_dep,as_o_S)
40+
41+$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
42+ $(call cmd,force_checksrc)
43+ $(call if_changed_rule,cc_o_c)
44+
45+$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o
46 $(call cmd,efi_ld)
47
48 # ACPI
49--
502.17.1
51
diff --git a/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc b/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
index d2073ea0c7..11b82b7e26 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common_2018.01.inc
@@ -11,6 +11,7 @@ SRCREV = "f3dd87e0b98999a78e500e8c6d2b063ebadf535a"
11 11
12SRC_URI = "git://git.denx.de/u-boot.git \ 12SRC_URI = "git://git.denx.de/u-boot.git \
13 file://MPC8315ERDB-enable-DHCP.patch \ 13 file://MPC8315ERDB-enable-DHCP.patch \
14 file://0001-efi_loader-avoid-make-race-condition.patch \
14" 15"
15 16
16S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"