From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v7 7/8] docs/manual: add details about top-level parallel build support
Date: Fri, 28 Dec 2018 14:03:27 +0100 [thread overview]
Message-ID: <20181228130327.GW14286@scaer> (raw)
In-Reply-To: <20181228104335.22379-8-thomas.petazzoni@bootlin.com>
Thomas, All,
On 2018-12-28 11:43 +0100, Thomas Petazzoni spake thusly:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> docs/manual/common-usage.txt | 44 +++++++++++++++++++++++++++++
> docs/manual/faq-troubleshooting.txt | 3 ++
> docs/manual/quickstart.txt | 8 +++---
> 3 files changed, 51 insertions(+), 4 deletions(-)
>
> diff --git a/docs/manual/common-usage.txt b/docs/manual/common-usage.txt
> index e3d7578c85..ebe3238e38 100644
> --- a/docs/manual/common-usage.txt
> +++ b/docs/manual/common-usage.txt
> @@ -329,6 +329,50 @@ Refer to the help text of this script for more details:
> utils/size-stats-compare -h
> ----------------
>
> +[[top-level-parallel-build]]
> +=== Top-level parallel build
I would really add a big-fat warning that this is still experimental:
.Note:
This section deals with a very experimental feature, which is known
to break even in some non-unusual situations. Use at your own risk.
> +Buildroot has always been capable of using parallel build on a per
> +package basis: each package is built by Buildroot using +make -jN+ (or
> +the equivalent invocation for non-make-based build systems). The level
> +of parallelism is by default number of CPUs + 1, but it can be
> +adjusted using the +BR2_JLEVEL+ configuration option.
> +
> +Until 2019.02, Buildroot was however building packages in a serial
> +fashion: each package was built one after the other, without
> +parallelization of the build between packages. As of 2019.02,
> +Buildroot has experimental support for *top-level parallel build*,
> +which allows some signicant build time savings by building packages
> +that have no dependency relationship in parallel. This feature is
> +however marked as experimental and is known to not work in all
> +situations.
... is know not to work in some cases.
(otherwise, the way you wrote it means it never works).
Besides, it would be interesting to list at least a few cases where it
is known to break, e.g.: qt5 packages...
> +In order to use top-level parallel build, one must:
> +
> +. Enable the option +BR2_PER_PACKAGE_DIRECTORIES+ in the Buildroot
> +configuration
> +
> +. Use +make -jN+ when starting the Buildroot build
> +
> +Internally, the +BR2_PER_PACKAGE_DIRECTORIES+ will enable a mechanism
> +called *per-package directories*, which will have the following
> +effects:
> +
> +* Instead of a global _target_ directory and a global _host_ directory
> + common to all packages, per-package _target_ and _host_ directories
> + will be used, in +$(O)/per-package/<pkg>/target/+ and
> + +$(O)/per-package/<pkg>/host/+ respectively. Those folders will be
s/folders/directories/ and elsewhere, too...
> + populated from the corresponding folders of the package dependencies
> + at the beginning of +<pkg>+ build. The compiler and all other tools
> + will therefore only be able to see and access files installed by
> + dependencies explicitly listed by +<pkg>+.
> +
> +* At the end of the build, the global _target_ and _host_ directories
> + will be populated, located in +$(O)/target+ and +$(O)/host+
> + respectively. This means that during the build, those folders will
> + be empty and it's only at the very end of the build that they will
> + be populated.
> +
> include::eclipse-integration.txt[]
>
> include::advanced.txt[]
> diff --git a/docs/manual/faq-troubleshooting.txt b/docs/manual/faq-troubleshooting.txt
> index b144c9e7f0..5adf3fa6ce 100644
> --- a/docs/manual/faq-troubleshooting.txt
> +++ b/docs/manual/faq-troubleshooting.txt
> @@ -239,3 +239,6 @@ help reduce the build time:
>
> * Buy new hardware. SSDs and lots of RAM are key to speeding up the
> builds.
> +
> + * Experiment with top-level parallel build, see
> + xref:top-level-parallel-build[].
> diff --git a/docs/manual/quickstart.txt b/docs/manual/quickstart.txt
> index 74158ae249..77b73ef116 100644
> --- a/docs/manual/quickstart.txt
> +++ b/docs/manual/quickstart.txt
> @@ -60,10 +60,10 @@ To start the build process, simply run:
> $ make
> --------------------
>
> -You *should never* use +make -jN+ with Buildroot: top-level parallel
> -make is currently not supported. Instead, use the +BR2_JLEVEL+ option
> -to tell Buildroot to run the compilation of each individual package
> -with +make -jN+.
> +By default, Buildroot does not support top-level parallel build, so
> +running +make -jN+ is not necessary. There is however experimental
> +support for top-level parallel build, see
> +xref:top-level-parallel-build[].
What about:
Buildroot does not officially support top-level parallel build,
so you should not use +make -jN+ when calling Buildroot. However,
there is *experimental* support for top-level parallel build, see
xref:top-level-parallel-build[].
Regards,
Yann E. MORIN.
> The `make` command will generally perform the following steps:
>
> --
> 2.20.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2018-12-28 13:03 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-28 10:43 [Buildroot] [PATCH v7 0/8] Top-level parallel build support Thomas Petazzoni
2018-12-28 10:43 ` [Buildroot] [PATCH v7 1/8] support/scripts/check-host-rpath: document existing functions Thomas Petazzoni
2018-12-28 12:47 ` Yann E. MORIN
2019-01-17 21:33 ` Peter Korsgaard
2018-12-28 10:43 ` [Buildroot] [PATCH v7 2/8] Makefile: move definition of TARGET_DIR inside .config condition Thomas Petazzoni
2018-12-28 12:49 ` Yann E. MORIN
2019-01-17 21:35 ` Peter Korsgaard
2018-12-28 10:43 ` [Buildroot] [PATCH v7 3/8] core: implement per-package SDK and target Thomas Petazzoni
2018-12-30 21:52 ` Yann E. MORIN
2018-12-31 14:31 ` Thomas Petazzoni
2018-12-31 14:45 ` Yann E. MORIN
2019-01-08 18:02 ` Jan Kundrát
2019-11-05 16:38 ` Thomas Petazzoni
2019-11-05 19:05 ` Carlos Santos
2019-11-06 7:57 ` Thomas Petazzoni
2019-11-06 8:13 ` Jan Kundrát
2018-12-28 10:43 ` [Buildroot] [PATCH v7 4/8] Makefile: allow top-level parallel build with BR2_PER_PACKAGE_DIRECTORIES=y Thomas Petazzoni
2018-12-28 12:51 ` Yann E. MORIN
2018-12-28 10:43 ` [Buildroot] [PATCH v7 5/8] package/pkg-generic: make libtool .la files compatible with per-package directories Thomas Petazzoni
2018-12-31 8:44 ` Yann E. MORIN
2018-12-28 10:43 ` [Buildroot] [PATCH v7 6/8] package/pkg-kconfig: handle KCONFIG_DEPENDENCIES " Thomas Petazzoni
2018-12-28 10:43 ` [Buildroot] [PATCH v7 7/8] docs/manual: add details about top-level parallel build support Thomas Petazzoni
2018-12-28 13:03 ` Yann E. MORIN [this message]
2018-12-28 13:08 ` Thomas Petazzoni
2018-12-31 8:46 ` Yann E. MORIN
2018-12-28 10:43 ` [Buildroot] [PATCH v7 8/8] docs/manual: document the effect of per-package directory on variables Thomas Petazzoni
2018-12-28 17:21 ` [Buildroot] [PATCH v7 0/8] Top-level parallel build support Thomas Petazzoni
2019-02-22 16:18 ` Andreas Naumann
2019-02-22 18:07 ` Vadim Kochan
2019-02-22 20:29 ` Thomas Petazzoni
2019-02-25 1:10 ` Vadim Kochan
2019-02-25 8:05 ` Thomas Petazzoni
2019-02-25 8:33 ` Vadim Kochan
2019-03-01 14:50 ` Vadym Kochan
2019-03-01 17:18 ` Yann E. MORIN
2019-03-04 7:24 ` Arnout Vandecappelle
2019-03-04 10:22 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181228130327.GW14286@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox