All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection
@ 2017-11-07 10:17 Alex Suykov
  2017-11-07 10:40 ` Thomas Petazzoni
  2017-11-11 22:39 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Alex Suykov @ 2017-11-07 10:17 UTC (permalink / raw)
  To: buildroot

The package includes some target-specific code that is irrelevant
in a host package but gets built anyway. The target for this code
must be one of the supported ChromeOS targets.

Supplied Makefile apparently relies on the environment to provide
a valid target, with a simple fallback to host arch. This breaks
the build if no value is provided and the host arch is not among
the supported ones.

Should fix
http://autobuild.buildroot.net/results/d118a83b6c4f7f910d0d44c279f36251d7ba29e8/
and similar failures.

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
---
v2: Hard-coded ARCH=arm to avoid target restrictions in a host package.

Build tested for arm and x86_64 targets on x86_64 host.
I cannot test PPC host, except maybe in qemu which will take
some time to set up.

 package/vboot-utils/vboot-utils.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/vboot-utils/vboot-utils.mk b/package/vboot-utils/vboot-utils.mk
index a6a67ad317..3f63f458cc 100644
--- a/package/vboot-utils/vboot-utils.mk
+++ b/package/vboot-utils/vboot-utils.mk
@@ -21,12 +21,17 @@ HOST_VBOOT_UTILS_DEPENDENCIES = host-openssl host-util-linux host-pkgconf
 # media partitioning.
 #
 # make target for futility is "futil".
+#
+# The value of ARCH is only relevant for crossystem (a target tool) and
+# does not affect futil or cgpt in any way as long as it is one of the
+# supported targets.
 
 define HOST_VBOOT_UTILS_BUILD_CMDS
 	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
 		CC="$(HOSTCC)" \
 		CFLAGS="$(HOST_CFLAGS) -D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \
 		LDFLAGS="$(HOST_LDFLAGS)" \
+		ARCH=arm \
 		futil cgpt
 endef
 
-- 
2.14.1

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

* [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection
  2017-11-07 10:17 [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection Alex Suykov
@ 2017-11-07 10:40 ` Thomas Petazzoni
  2017-11-07 11:19   ` Alex Suykov
  2017-11-11 22:39 ` Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-11-07 10:40 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 7 Nov 2017 12:17:15 +0200, Alex Suykov wrote:
> The package includes some target-specific code that is irrelevant
> in a host package but gets built anyway. The target for this code
> must be one of the supported ChromeOS targets.
> 
> Supplied Makefile apparently relies on the environment to provide
> a valid target, with a simple fallback to host arch. This breaks
> the build if no value is provided and the host arch is not among
> the supported ones.
> 
> Should fix
> http://autobuild.buildroot.net/results/d118a83b6c4f7f910d0d44c279f36251d7ba29e8/
> and similar failures.
> 
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>

Thanks for this new version. However, you still didn't reply to me
about what happens when HOST_ARCH != ARCH. The vboot-utils Makefile
seems to have some logic to use Qemu in that case. Do you understand
what it does exactly with Qemu, and that we won't have a problem by
having HOST_ARCH != ARCH ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection
  2017-11-07 10:40 ` Thomas Petazzoni
@ 2017-11-07 11:19   ` Alex Suykov
  2017-11-07 13:31     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Suykov @ 2017-11-07 11:19 UTC (permalink / raw)
  To: buildroot

Tue, Nov 07, 2017 at 11:40:37AM +0100, Thomas Petazzoni wrote:

> Thanks for this new version. However, you still didn't reply to me
> about what happens when HOST_ARCH != ARCH. The vboot-utils Makefile
> seems to have some logic to use Qemu in that case. Do you understand
> what it does exactly with Qemu, and that we won't have a problem by
> having HOST_ARCH != ARCH ?

Qemu is only used to run cross-compiled tests. Buildroot package
neither builds nor runs tests, so it doesn't really matter whether
qemu gets configured there or not.

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

* [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection
  2017-11-07 11:19   ` Alex Suykov
@ 2017-11-07 13:31     ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-11-07 13:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 7 Nov 2017 13:19:38 +0200, Alex Suykov wrote:

> > Thanks for this new version. However, you still didn't reply to me
> > about what happens when HOST_ARCH != ARCH. The vboot-utils Makefile
> > seems to have some logic to use Qemu in that case. Do you understand
> > what it does exactly with Qemu, and that we won't have a problem by
> > having HOST_ARCH != ARCH ?  
> 
> Qemu is only used to run cross-compiled tests. Buildroot package
> neither builds nor runs tests, so it doesn't really matter whether
> qemu gets configured there or not.

OK, makes sense, thanks for the explanation. The patch is good to go!

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection
  2017-11-07 10:17 [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection Alex Suykov
  2017-11-07 10:40 ` Thomas Petazzoni
@ 2017-11-11 22:39 ` Thomas Petazzoni
  2017-11-26 21:28   ` Peter Korsgaard
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-11-11 22:39 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 7 Nov 2017 12:17:15 +0200, Alex Suykov wrote:
> The package includes some target-specific code that is irrelevant
> in a host package but gets built anyway. The target for this code
> must be one of the supported ChromeOS targets.
> 
> Supplied Makefile apparently relies on the environment to provide
> a valid target, with a simple fallback to host arch. This breaks
> the build if no value is provided and the host arch is not among
> the supported ones.
> 
> Should fix
> http://autobuild.buildroot.net/results/d118a83b6c4f7f910d0d44c279f36251d7ba29e8/
> and similar failures.
> 
> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
> ---
> v2: Hard-coded ARCH=arm to avoid target restrictions in a host package.

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection
  2017-11-11 22:39 ` Thomas Petazzoni
@ 2017-11-26 21:28   ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2017-11-26 21:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Tue, 7 Nov 2017 12:17:15 +0200, Alex Suykov wrote:
 >> The package includes some target-specific code that is irrelevant
 >> in a host package but gets built anyway. The target for this code
 >> must be one of the supported ChromeOS targets.
 >> 
 >> Supplied Makefile apparently relies on the environment to provide
 >> a valid target, with a simple fallback to host arch. This breaks
 >> the build if no value is provided and the host arch is not among
 >> the supported ones.
 >> 
 >> Should fix
 >> http://autobuild.buildroot.net/results/d118a83b6c4f7f910d0d44c279f36251d7ba29e8/
 >> and similar failures.
 >> 
 >> Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
 >> ---
 >> v2: Hard-coded ARCH=arm to avoid target restrictions in a host package.

 > Applied to master, thanks.

Committed to 2017.02.x and 2017.08.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2017-11-26 21:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 10:17 [Buildroot] [PATCH v2] vboot-utils: fix ARCH detection Alex Suykov
2017-11-07 10:40 ` Thomas Petazzoni
2017-11-07 11:19   ` Alex Suykov
2017-11-07 13:31     ` Thomas Petazzoni
2017-11-11 22:39 ` Thomas Petazzoni
2017-11-26 21:28   ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.