All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Speeding up the Build
@ 2016-02-04 17:24 Steve Calfee
  2016-02-06 14:24 ` Luca Ceresoli
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Calfee @ 2016-02-04 17:24 UTC (permalink / raw)
  To: buildroot

Hi,

I know buy faster hardware...

We have the ability to share a common download directory, so multiple
systems builds can have faster downloads.

We have the ability to install a pre-build toolchain - that really helps.

We can have multiple output directories, using the single downloaded
buildroot directory. Saves git downloading and disk storage.

Is there any way to share the host built utilities? It could be done
like using a pre-built toolchain, or some kind of special links for
output/host. The problem is .../host is splatted right in the middle
of the dynamic per build output directory. Do these files get changed
much in normal buildroot use, so they should stay in output?

Thanks for any suggestions,
Steve

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

* [Buildroot] Speeding up the Build
  2016-02-04 17:24 [Buildroot] Speeding up the Build Steve Calfee
@ 2016-02-06 14:24 ` Luca Ceresoli
  2016-02-08 20:14   ` Steve Calfee
  0 siblings, 1 reply; 7+ messages in thread
From: Luca Ceresoli @ 2016-02-06 14:24 UTC (permalink / raw)
  To: buildroot

Hi Steve,

Steve Calfee wrote:
> Hi,
>
> I know buy faster hardware...
>
> We have the ability to share a common download directory, so multiple
> systems builds can have faster downloads.
>
> We have the ability to install a pre-build toolchain - that really helps.
>
> We can have multiple output directories, using the single downloaded
> buildroot directory. Saves git downloading and disk storage.
>
> Is there any way to share the host built utilities? It could be done
> like using a pre-built toolchain, or some kind of special links for
> output/host. The problem is .../host is splatted right in the middle
> of the dynamic per build output directory. Do these files get changed
> much in normal buildroot use, so they should stay in output?

Not quite replying to your question (Arnout has already done, with
great detail).

But I submitted a patch [0] to skip host-cmake building entirely. It
saves 30% of the build time in my setup. If you use cmake-based
packages, you might want to give it a try and give your feedback.

[0] http://patchwork.ozlabs.org/patch/579445/

-- 
Luca

-- 
Luca

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

* [Buildroot] Speeding up the Build
  2016-02-06 14:24 ` Luca Ceresoli
@ 2016-02-08 20:14   ` Steve Calfee
  2016-02-08 20:20     ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Calfee @ 2016-02-08 20:14 UTC (permalink / raw)
  To: buildroot

On Sat, Feb 6, 2016 at 6:24 AM, Luca Ceresoli <luca@lucaceresoli.net> wrote:
> Hi Steve,
>
> Steve Calfee wrote:
>>
<snip>
>> Is there any way to share the host built utilities? It could be done
>> like using a pre-built toolchain, or some kind of special links for
>> output/host. The problem is .../host is splatted right in the middle
>> of the dynamic per build output directory. Do these files get changed
>> much in normal buildroot use, so they should stay in output?
>
>
> Not quite replying to your question (Arnout has already done, with
> great detail).
>
> But I submitted a patch [0] to skip host-cmake building entirely. It
> saves 30% of the build time in my setup. If you use cmake-based
> packages, you might want to give it a try and give your feedback.
>
> [0] http://patchwork.ozlabs.org/patch/579445/
>
> --
> Luca


Sorry I don't use CMAKE. Could your solution be extended to other host
packages? Python for instance takes a long time to build and I have
one installed. Unless we are patching the host tool or require a
special version, it would build faster if buildroot used the installed
version rather than building. I mean generically it would be nice.

Steve

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

* [Buildroot] Speeding up the Build
  2016-02-08 20:14   ` Steve Calfee
@ 2016-02-08 20:20     ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2016-02-08 20:20 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 8 Feb 2016 12:14:35 -0800, Steve Calfee wrote:

> Sorry I don't use CMAKE. Could your solution be extended to other host
> packages? Python for instance takes a long time to build and I have
> one installed. Unless we are patching the host tool or require a
> special version, it would build faster if buildroot used the installed
> version rather than building. I mean generically it would be nice.

For Python, we:

 1/ Need a host-python whose version matches the one of the target
    python being built.

 2/ Need some special host tools that are built as part of the
    host-python build, in order to build some stuff for the target
    python.

So unfortunately, it's not straightforward to use the Python of your
distribution.

Best regards,

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

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

* [Buildroot] Speeding up the build.
  2016-02-03 21:59 [Buildroot] Speeding up the build Steve Calfee
  2016-02-05 21:00 ` Arnout Vandecappelle
@ 2016-02-05 21:04 ` Arnout Vandecappelle
  1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2016-02-05 21:04 UTC (permalink / raw)
  To: buildroot

On 03-02-16 22:59, Steve Calfee wrote:
> Hi,
> 
> I know buy faster hardware...
> 
> We have the ability to share a common download directory, so multiple
> systems builds can have faster downloads.
> 
> We have the ability to install a pre-build toolchain - that really helps.
> 
> We can have multiple output directories, using the single downloaded
> buildroot directory. Saves git downloading and disk storage.
> 
> Is there any way to share the host built utilities? It could be done
> like using a pre-built toolchain, or some kind of special links for
> output/host. The problem is .../host is splatted right in the middle
> of the dynamic per build output directory. Do these files get changed
> much in normal buildroot use, so they should stay in output?

 Short answer: no it's not possible.

 First of all, at the moment there is no guarantee that the host utilities are
relocatable. There may be absolute paths to the libraries they link with
hardcoded in the binaries. There's a patch series that deals with that issue
(search for rpath on patchwork). It's not likely to get merged before 2016.02.

 Second, we currently have no way of detecting host tools that are already part
of the external toolchain. It is assumed that the external toolchain is nothing
more than gcc, binutils, libc, and kernel headers.

 You could do a hack where you make a tarball of output/build/host-* after
removing the .stamp_host_installed files. But then you run into the issue of
reproducible builds, of course: who guarantees that your host tools will be
built the same under a different configuration?

 It would already become a little more reliable with the per-package staging
patches, if they would be extended to per-package host directories as well. The
patches for that no longer appear in patchwork because they need to be reworked
completely to work with the toolchain wrapper. But Fabio doesn't seem to be
active on that series anymore. You could retrieve the series from [1] and take a
stab at it.

 That series also enables top-level parallel build. That is something that can
cut the build time roughly in half. You can even enable that now already, though
it is risky because you loose reproducible builds again. Search for NOTPARALLEL
in the top-level Makefile and read all the warnings.


 Regards,
 Arnout


[1] http://patchwork.ozlabs.org/project/buildroot/list/?submitter=fabio&state=7



-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] Speeding up the build.
  2016-02-03 21:59 [Buildroot] Speeding up the build Steve Calfee
@ 2016-02-05 21:00 ` Arnout Vandecappelle
  2016-02-05 21:04 ` Arnout Vandecappelle
  1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2016-02-05 21:00 UTC (permalink / raw)
  To: buildroot

On 03-02-16 22:59, Steve Calfee wrote:
> Hi,
> 
> I know buy faster hardware...
> 
> We have the ability to share a common download directory, so multiple
> systems builds can have faster downloads.
> 
> We have the ability to install a pre-build toolchain - that really helps.
> 
> We can have multiple output directories, using the single downloaded
> buildroot directory. Saves git downloading and disk storage.
> 
> Is there any way to share the host built utilities? It could be done
> like using a pre-built toolchain, or some kind of special links for
> output/host. The problem is .../host is splatted right in the middle
> of the dynamic per build output directory. Do these files get changed
> much in normal buildroot use, so they should stay in output?

 Short answer: no it's not possible.

 First of all, at the moment there is no guarantee that the host utilities are
relocatable. There may be absolute paths to the libraries they link with
hardcoded in the binaries. There's a patch series that deals with that issue
(search for rpath on patchwork). It's not likely to get merged before 2016.02.

 Second, we currently have no way of detecting host tools that are already part
of the external toolchain. It is assumed that the external toolchain is nothing
more than gcc, binutils, libc, and kernel headers.

 You could do a hack where you make a tarball of output/build/host-* after
removing the .stamp_host_installed files. But then you run into the issue of
reproducible builds, of course: who guarantees that your host tools will be
built the same under a different configuration?

 It would already become a little more reliable with the per-package staging
patches, if they would be extended to per-package host directories as well. The
patches for that no longer appear in patchwork because they need to be reworked
completely to work with the toolchain wrapper. But Fabio doesn't seem to be
active on that series anymore. You could retrieve the series from [1] and take a
stab at it.

 That series also enables top-level parallel build. That is something that can
cut the build time roughly in half. You can even enable that now already, though
it is risky because you loose reproducible builds again. Search for NOTPARALLEL
in the top-level Makefile and read all the warnings.


 Regards,
 Arnout


[1] http://patchwork.ozlabs.org/project/buildroot/list/?submitter=fabio&state=7



-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] Speeding up the build.
@ 2016-02-03 21:59 Steve Calfee
  2016-02-05 21:00 ` Arnout Vandecappelle
  2016-02-05 21:04 ` Arnout Vandecappelle
  0 siblings, 2 replies; 7+ messages in thread
From: Steve Calfee @ 2016-02-03 21:59 UTC (permalink / raw)
  To: buildroot

Hi,

I know buy faster hardware...

We have the ability to share a common download directory, so multiple
systems builds can have faster downloads.

We have the ability to install a pre-build toolchain - that really helps.

We can have multiple output directories, using the single downloaded
buildroot directory. Saves git downloading and disk storage.

Is there any way to share the host built utilities? It could be done
like using a pre-built toolchain, or some kind of special links for
output/host. The problem is .../host is splatted right in the middle
of the dynamic per build output directory. Do these files get changed
much in normal buildroot use, so they should stay in output?

Thanks for any suggestions,
Steve

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

end of thread, other threads:[~2016-02-08 20:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-04 17:24 [Buildroot] Speeding up the Build Steve Calfee
2016-02-06 14:24 ` Luca Ceresoli
2016-02-08 20:14   ` Steve Calfee
2016-02-08 20:20     ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2016-02-03 21:59 [Buildroot] Speeding up the build Steve Calfee
2016-02-05 21:00 ` Arnout Vandecappelle
2016-02-05 21:04 ` Arnout Vandecappelle

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.