public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bob Feng" <bob.c.feng@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"leif@nuviainc.com" <leif@nuviainc.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 2/4] Readme.md: update build parallellism information
Date: Tue, 21 Jul 2020 03:58:29 +0000	[thread overview]
Message-ID: <BN6PR11MB00689067F4E21868C51C0D83C9780@BN6PR11MB0068.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200715122027.970-3-leif@nuviainc.com>

Change looks good. 

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Leif Lindholm
Sent: Wednesday, July 15, 2020 8:20 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [edk2-devel] [PATCH edk2-platforms 2/4] Readme.md: update build parallellism information

BaseTools can now be built in parallel, so drop the statement that says it cannot, and add -j flag to example command line.

Also, the `build` command now utilizes parallellism by default, so update text and examples to reflect this (and drop the examples for manually figuring out available core count).

Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
 Readme.md | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/Readme.md b/Readme.md
index c5df5a15f53d..e1350b456619 100644
--- a/Readme.md
+++ b/Readme.md
@@ -105,11 +105,7 @@ target-specific binutils. These are included with any prepackaged GCC toolchain
    (This step _depends_ on **WORKSPACE** being set as per above.)  1. Build BaseTools
 
-   `make -C edk2/BaseTools`
-
-   (BaseTools can currently not be built in parallel, so do not specify any `-j`
-   option, either on the command line or in a **MAKEFLAGS** environment
-   variable.)
+   `make -C edk2/BaseTools -j`
 
 ### Build options
 There are a number of options that can (or must) be specified at the point of
@@ -123,8 +119,9 @@ TARGET            | `-b`         | One of DEBUG, RELEASE or NOOPT.
 TARGET_ARCH       | `-a`         | Architecture to build for.
 TOOL_CHAIN_TAG    | `-t`         | Toolchain profile to use for building.
 
-There is also MAX_CONCURRENT_THREAD_NUMBER (`-n`), roughly equivalent to -`make -j`.
+The `build` command will automatically determine the number of 
+available cpus and enable parallell builds. If you wish to restrict the 
+parallellism, the `-n` option specifies how many threads to use.
 
 When specified on command line, `-b` can be repeated multiple times in order to  build multiple targets sequentially.
@@ -133,21 +130,10 @@ After a successful build, the resulting images can be found in  `Build/{Platform Name}/{TARGET}_{TOOL_CHAIN_TAG}/FV`.
 
 ### Build a platform
-The main build process _can_ run in parallel - so figure out how many threads we -have available.
-
-```
-$ getconf _NPROCESSORS_ONLN
-8
-```
-OK, so we have 8 CPUs - let's tell the build to use a little more than that:
-```
-$ NUM_CPUS=$((`getconf _NPROCESSORS_ONLN` + 2)) -```  For the toolchain tag, use GCC5 for gcc version 5 or later, GCC4x for  earlier versions, or CLANG35/CLANG38 as appropriate when building with clang.
 ```
-$ build -n $NUM_CPUS -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc
+$ build -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc
 ```
 (Note that the description file gets resolved by the build command through  searching in all locations specified in **PACKAGES_PATH**.)
--
2.20.1





  reply	other threads:[~2020-07-21  3:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15 12:20 [PATCH edk2-platforms 0/4] Readme.md: various build example updates Leif Lindholm
2020-07-15 12:20 ` [PATCH edk2-platforms 1/4] Readme.md: wrap long line Leif Lindholm
2020-07-15 12:20 ` [PATCH edk2-platforms 2/4] Readme.md: update build parallellism information Leif Lindholm
2020-07-21  3:58   ` Bob Feng [this message]
2020-07-15 12:20 ` [PATCH edk2-platforms 3/4] Readme.md: update ARM/AARCH64 cross-toolchain info Leif Lindholm
2020-07-15 12:20 ` [PATCH edk2-platforms 4/4] Readme.md: add example command line to cross compiling section Leif Lindholm

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-list 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=BN6PR11MB00689067F4E21868C51C0D83C9780@BN6PR11MB0068.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /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