Openembedded Core Discussions
 help / color / mirror / Atom feed
* [sumo][PATCH] u-boot: Fix build race condition
@ 2018-07-25 18:03 Joshua Watt
  2018-07-25 18:11 ` [sumo][PATCH v2] " Joshua Watt
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Watt @ 2018-07-25 18:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Joshua Watt

From: Joshua Watt <JPEWhacker@gmain.com>

Backports 2f61b13d6acba787b00598d519c85222e993e4ca (included in the
2018.07 release) which fixes a race condition when building.

Change-Id: If7af74cafd9d22fcb23cfe2ffd12084ca5ca083b
Signed-off-by: Joshua Watt <JPEWhacker@gmain.com>
---
 ...efi_loader-avoid-make-race-condition.patch | 51 +++++++++++++++++++
 .../u-boot/u-boot-common_2018.01.inc          |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch

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 @@
+From 5c2e24a9ed54dfee77d1844a080e998b4affe916 Mon Sep 17 00:00:00 2001
+From: Heinrich Schuchardt <xypron.glpk@gmx.de>
+Date: Sat, 2 Jun 2018 19:00:41 +0200
+Subject: [PATCH] efi_loader: avoid make race condition
+
+When U-Boot is built with 'make -j' there is not guarantee that targets in
+directory arch/ are built before targets in directory lib/. The current
+build instruction for EFI binaries in lib/ rely on dependencies in arch/.
+If $(EFI_CRT0) or $(EFI_RELOC) is not yet built before trying to build
+%.efi an error
+    *** No rule to make target '%.efi'
+occurs.
+
+With the patch separate copies of $(EFI_CRT0) and $(EFI_RELOC) named
+efi_crt0.o and efi_reloc.o are built in lib/efi_loader and
+lib/efi_selftest.
+
+Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
+Signed-off-by: Alexander Graf <agraf@suse.de>
+
+Upstream-Status: Backport from 2018.07
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ scripts/Makefile.lib | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 8f19b2db56..f2f398c935 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -404,8 +404,14 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \
+ 
+ EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)
+ 
+-$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \
+-		arch/$(ARCH)/lib/$(EFI_RELOC)
++$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S)
++	$(call if_changed_dep,as_o_S)
++
++$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
++	$(call cmd,force_checksrc)
++	$(call if_changed_rule,cc_o_c)
++
++$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o
+ 	$(call cmd,efi_ld)
+ 
+ # ACPI
+-- 
+2.17.1
+
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"
 
 SRC_URI = "git://git.denx.de/u-boot.git \
     file://MPC8315ERDB-enable-DHCP.patch \
+    file://0001-efi_loader-avoid-make-race-condition.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [sumo][PATCH v2] u-boot: Fix build race condition
  2018-07-25 18:03 [sumo][PATCH] u-boot: Fix build race condition Joshua Watt
@ 2018-07-25 18:11 ` Joshua Watt
  2018-07-26 15:04   ` [sumo][PATCH v3] " Joshua Watt
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Watt @ 2018-07-25 18:11 UTC (permalink / raw)
  To: openembedded-core

Backports 2f61b13d6acba787b00598d519c85222e993e4ca (included in the
2018.07 release) which fixes a race condition when building.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 ...efi_loader-avoid-make-race-condition.patch | 51 +++++++++++++++++++
 .../u-boot/u-boot-common_2018.01.inc          |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch

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 @@
+From 5c2e24a9ed54dfee77d1844a080e998b4affe916 Mon Sep 17 00:00:00 2001
+From: Heinrich Schuchardt <xypron.glpk@gmx.de>
+Date: Sat, 2 Jun 2018 19:00:41 +0200
+Subject: [PATCH] efi_loader: avoid make race condition
+
+When U-Boot is built with 'make -j' there is not guarantee that targets in
+directory arch/ are built before targets in directory lib/. The current
+build instruction for EFI binaries in lib/ rely on dependencies in arch/.
+If $(EFI_CRT0) or $(EFI_RELOC) is not yet built before trying to build
+%.efi an error
+    *** No rule to make target '%.efi'
+occurs.
+
+With the patch separate copies of $(EFI_CRT0) and $(EFI_RELOC) named
+efi_crt0.o and efi_reloc.o are built in lib/efi_loader and
+lib/efi_selftest.
+
+Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
+Signed-off-by: Alexander Graf <agraf@suse.de>
+
+Upstream-Status: Backport from 2018.07
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ scripts/Makefile.lib | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 8f19b2db56..f2f398c935 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -404,8 +404,14 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \
+ 
+ EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)
+ 
+-$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \
+-		arch/$(ARCH)/lib/$(EFI_RELOC)
++$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S)
++	$(call if_changed_dep,as_o_S)
++
++$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
++	$(call cmd,force_checksrc)
++	$(call if_changed_rule,cc_o_c)
++
++$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o
+ 	$(call cmd,efi_ld)
+ 
+ # ACPI
+-- 
+2.17.1
+
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"
 
 SRC_URI = "git://git.denx.de/u-boot.git \
     file://MPC8315ERDB-enable-DHCP.patch \
+    file://0001-efi_loader-avoid-make-race-condition.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [sumo][PATCH v3] u-boot: Fix build race condition
  2018-07-25 18:11 ` [sumo][PATCH v2] " Joshua Watt
@ 2018-07-26 15:04   ` Joshua Watt
  2018-07-26 15:26     ` akuster808
  0 siblings, 1 reply; 4+ messages in thread
From: Joshua Watt @ 2018-07-26 15:04 UTC (permalink / raw)
  To: openembedded-core

Backports 2f61b13d6acba787b00598d519c85222e993e4ca (included in the
2018.07 release) which fixes a race condition when building.

[YOCTO #12705]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 ...efi_loader-avoid-make-race-condition.patch | 51 +++++++++++++++++++
 .../u-boot/u-boot-common_2018.01.inc          |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch

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 @@
+From 5c2e24a9ed54dfee77d1844a080e998b4affe916 Mon Sep 17 00:00:00 2001
+From: Heinrich Schuchardt <xypron.glpk@gmx.de>
+Date: Sat, 2 Jun 2018 19:00:41 +0200
+Subject: [PATCH] efi_loader: avoid make race condition
+
+When U-Boot is built with 'make -j' there is not guarantee that targets in
+directory arch/ are built before targets in directory lib/. The current
+build instruction for EFI binaries in lib/ rely on dependencies in arch/.
+If $(EFI_CRT0) or $(EFI_RELOC) is not yet built before trying to build
+%.efi an error
+    *** No rule to make target '%.efi'
+occurs.
+
+With the patch separate copies of $(EFI_CRT0) and $(EFI_RELOC) named
+efi_crt0.o and efi_reloc.o are built in lib/efi_loader and
+lib/efi_selftest.
+
+Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
+Signed-off-by: Alexander Graf <agraf@suse.de>
+
+Upstream-Status: Backport from 2018.07
+
+Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
+---
+ scripts/Makefile.lib | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 8f19b2db56..f2f398c935 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -404,8 +404,14 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \
+ 
+ EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)
+ 
+-$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \
+-		arch/$(ARCH)/lib/$(EFI_RELOC)
++$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S)
++	$(call if_changed_dep,as_o_S)
++
++$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
++	$(call cmd,force_checksrc)
++	$(call if_changed_rule,cc_o_c)
++
++$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o
+ 	$(call cmd,efi_ld)
+ 
+ # ACPI
+-- 
+2.17.1
+
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"
 
 SRC_URI = "git://git.denx.de/u-boot.git \
     file://MPC8315ERDB-enable-DHCP.patch \
+    file://0001-efi_loader-avoid-make-race-condition.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [sumo][PATCH v3] u-boot: Fix build race condition
  2018-07-26 15:04   ` [sumo][PATCH v3] " Joshua Watt
@ 2018-07-26 15:26     ` akuster808
  0 siblings, 0 replies; 4+ messages in thread
From: akuster808 @ 2018-07-26 15:26 UTC (permalink / raw)
  To: Joshua Watt, openembedded-core



On 07/26/2018 08:04 AM, Joshua Watt wrote:
> Backports 2f61b13d6acba787b00598d519c85222e993e4ca (included in the
> 2018.07 release) which fixes a race condition when building.
>
> [YOCTO #12705]

Thanks. I will pull in shorly

- armin
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>  ...efi_loader-avoid-make-race-condition.patch | 51 +++++++++++++++++++
>  .../u-boot/u-boot-common_2018.01.inc          |  1 +
>  2 files changed, 52 insertions(+)
>  create mode 100644 meta/recipes-bsp/u-boot/files/0001-efi_loader-avoid-make-race-condition.patch
>
> 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 @@
> +From 5c2e24a9ed54dfee77d1844a080e998b4affe916 Mon Sep 17 00:00:00 2001
> +From: Heinrich Schuchardt <xypron.glpk@gmx.de>
> +Date: Sat, 2 Jun 2018 19:00:41 +0200
> +Subject: [PATCH] efi_loader: avoid make race condition
> +
> +When U-Boot is built with 'make -j' there is not guarantee that targets in
> +directory arch/ are built before targets in directory lib/. The current
> +build instruction for EFI binaries in lib/ rely on dependencies in arch/.
> +If $(EFI_CRT0) or $(EFI_RELOC) is not yet built before trying to build
> +%.efi an error
> +    *** No rule to make target '%.efi'
> +occurs.
> +
> +With the patch separate copies of $(EFI_CRT0) and $(EFI_RELOC) named
> +efi_crt0.o and efi_reloc.o are built in lib/efi_loader and
> +lib/efi_selftest.
> +
> +Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> +Signed-off-by: Alexander Graf <agraf@suse.de>
> +
> +Upstream-Status: Backport from 2018.07
> +
> +Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> +---
> + scripts/Makefile.lib | 10 ++++++++--
> + 1 file changed, 8 insertions(+), 2 deletions(-)
> +
> +diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> +index 8f19b2db56..f2f398c935 100644
> +--- a/scripts/Makefile.lib
> ++++ b/scripts/Makefile.lib
> +@@ -404,8 +404,14 @@ cmd_efi_ld = $(LD) -nostdlib -znocombreloc -T $(EFI_LDS_PATH) -shared \
> + 
> + EFI_LDS_PATH = $(srctree)/arch/$(ARCH)/lib/$(EFI_LDS)
> + 
> +-$(obj)/%_efi.so: $(obj)/%.o arch/$(ARCH)/lib/$(EFI_CRT0) \
> +-		arch/$(ARCH)/lib/$(EFI_RELOC)
> ++$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S)
> ++	$(call if_changed_dep,as_o_S)
> ++
> ++$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
> ++	$(call cmd,force_checksrc)
> ++	$(call if_changed_rule,cc_o_c)
> ++
> ++$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o
> + 	$(call cmd,efi_ld)
> + 
> + # ACPI
> +-- 
> +2.17.1
> +
> 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"
>  
>  SRC_URI = "git://git.denx.de/u-boot.git \
>      file://MPC8315ERDB-enable-DHCP.patch \
> +    file://0001-efi_loader-avoid-make-race-condition.patch \
>  "
>  
>  S = "${WORKDIR}/git"



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-26 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-25 18:03 [sumo][PATCH] u-boot: Fix build race condition Joshua Watt
2018-07-25 18:11 ` [sumo][PATCH v2] " Joshua Watt
2018-07-26 15:04   ` [sumo][PATCH v3] " Joshua Watt
2018-07-26 15:26     ` akuster808

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox