public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 0/4] Readme.md: various build example updates
@ 2020-07-15 12:20 Leif Lindholm
  2020-07-15 12:20 ` [PATCH edk2-platforms 1/4] Readme.md: wrap long line Leif Lindholm
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Leif Lindholm @ 2020-07-15 12:20 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Vin Xue

As reported by Vin Xue, the URL for downloading GCC cross-toolchains
from Linaro went away - but they are now also released directly by ARM.
Update link to download page, and also update description to point out
that there are now aarch64->aarch32 cross compilers published.

Also, a patch from Vin Xue adding a full usage example for a
cross-compiling build command line.

Before that, a preparatory patch breaking a way too long line, and
another one aligning the documenting of build parallellism with current
reality.

Leif Lindholm (3):
  Readme.md: wrap long line
  Readme.md: update build parallellism information
  Readme.md: update ARM/AARCH64 cross-toolchain info

Vin Xue (1):
  Readme.md: add example command line to cross compiling section

 Readme.md | 40 +++++++++++++++-------------------------
 1 file changed, 15 insertions(+), 25 deletions(-)

Cc: Vin Xue <vinxue@outlook.com>
-- 
2.20.1


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

* [PATCH edk2-platforms 1/4] Readme.md: wrap long line
  2020-07-15 12:20 [PATCH edk2-platforms 0/4] Readme.md: various build example updates Leif Lindholm
@ 2020-07-15 12:20 ` Leif Lindholm
  2020-07-15 12:20 ` [PATCH edk2-platforms 2/4] Readme.md: update build parallellism information Leif Lindholm
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Leif Lindholm @ 2020-07-15 12:20 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney

The line describing how to set cross compiler prefix was way too long,
wrap it to match the rest of the file.

Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
 Readme.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Readme.md b/Readme.md
index ea9492240adb..c5df5a15f53d 100644
--- a/Readme.md
+++ b/Readme.md
@@ -159,7 +159,8 @@ build command which toolchain to use. We do this by setting the environment
 variable `{TOOL_CHAIN_TAG}_{TARGET_ARCH}_PREFIX` - in the case above,
 **GCC5_AARCH64_PREFIX**.
 
-So, referring to the cross compiler toolchain table above, we should prepend the `build` command line with `GCC5_AARCH64_PREFIX=aarch64-linux-gnu-`.
+So, referring to the cross compiler toolchain table above, we should prepend the
+`build` command line with `GCC5_AARCH64_PREFIX=aarch64-linux-gnu-`.
 
 ## Using uefi-tools helper scripts
 uefi-tools is a completely unofficial set of helper-scripts developed by Linaro.
-- 
2.20.1


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

* [PATCH edk2-platforms 2/4] Readme.md: update build parallellism information
  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 ` Leif Lindholm
  2020-07-21  3:58   ` [edk2-devel] " Bob Feng
  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
  3 siblings, 1 reply; 6+ messages in thread
From: Leif Lindholm @ 2020-07-15 12:20 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney

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


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

* [PATCH edk2-platforms 3/4] Readme.md: update ARM/AARCH64 cross-toolchain info
  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-15 12:20 ` Leif Lindholm
  2020-07-15 12:20 ` [PATCH edk2-platforms 4/4] Readme.md: add example command line to cross compiling section Leif Lindholm
  3 siblings, 0 replies; 6+ messages in thread
From: Leif Lindholm @ 2020-07-15 12:20 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Vin Xue

In the past, Linaro released binary builds of GCC cross-toolchains for
ARM and AARCH64, but this has since stopped, and up-to-date toolchains
are now being released directly by ARM. Update cross compilation section
of documentation to reflect this.

Reported-by: Vin Xue <vinxue@outlook.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
 Readme.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Readme.md b/Readme.md
index e1350b456619..a800f86b84a9 100644
--- a/Readme.md
+++ b/Readme.md
@@ -56,11 +56,11 @@ X64                 | x86_64-linux-gnu-
 \* i386, i486, i586 or i686
 
 ### GCC
-Linaro provides GCC toolchains for
-[aarch64-linux-gnu](https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/)
-and [arm-linux-gnueabihf](https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/)
-compiled to run on x86_64/i686 Linux and i686 Windows. Some Linux distributions
-provide their own packaged cross-toolchains.
+ARM provides binary downloads of prebuilt GCC cross-toolchains for
+[aarch64-linux-gnu and arm-linux-gnueabihf](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads)
+compiled to run on i686 Windows as well as x86_64 and aarch64
+(for arm-linux-gnueabihf) x86_64 Linux.
+Some Linux distributions provide their own packaged cross-toolchains.
 
 ### clang
 Clang does not require separate cross compilers, but it does need a
-- 
2.20.1


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

* [PATCH edk2-platforms 4/4] Readme.md: add example command line to cross compiling section
  2020-07-15 12:20 [PATCH edk2-platforms 0/4] Readme.md: various build example updates Leif Lindholm
                   ` (2 preceding siblings ...)
  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 ` Leif Lindholm
  3 siblings, 0 replies; 6+ messages in thread
From: Leif Lindholm @ 2020-07-15 12:20 UTC (permalink / raw)
  To: devel; +Cc: Michael D Kinney, Vin Xue

From: Vin Xue <vinxue@outlook.com>

Add build command example for cross compiling.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Vin Xue <vinxue@outlook.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
---
 Readme.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Readme.md b/Readme.md
index a800f86b84a9..3de88c330f5c 100644
--- a/Readme.md
+++ b/Readme.md
@@ -147,6 +147,9 @@ variable `{TOOL_CHAIN_TAG}_{TARGET_ARCH}_PREFIX` - in the case above,
 
 So, referring to the cross compiler toolchain table above, we should prepend the
 `build` command line with `GCC5_AARCH64_PREFIX=aarch64-linux-gnu-`.
+```
+$ GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -a AARCH64 -t GCC5 -p Platform/ARM/JunoPkg/ArmJuno.dsc
+```
 
 ## Using uefi-tools helper scripts
 uefi-tools is a completely unofficial set of helper-scripts developed by Linaro.
-- 
2.20.1


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

* Re: [edk2-devel] [PATCH edk2-platforms 2/4] Readme.md: update build parallellism information
  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
  0 siblings, 0 replies; 6+ messages in thread
From: Bob Feng @ 2020-07-21  3:58 UTC (permalink / raw)
  To: devel@edk2.groups.io, leif@nuviainc.com; +Cc: Kinney, Michael D

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





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

end of thread, other threads:[~2020-07-21  3:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [edk2-devel] " Bob Feng
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

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