From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web11.5501.1594815633348953487 for ; Wed, 15 Jul 2020 05:20:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=odch9kRg; spf=pass (domain: nuviainc.com, ip: 209.85.128.67, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f67.google.com with SMTP id q15so5390016wmj.2 for ; Wed, 15 Jul 2020 05:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O+QuFtDXTlDoUw38WR/cn/+Lvgq8nNlIRzIpExfHRWI=; b=odch9kRgF3ctXrbMpfv2izl0pvaLTIfx80cL97VDB/pzmlOgKHlPaZ/YuPdCPAh4ns IHkv911siZHY8qJ/nTrNrfdQeH6UN6eP63HIaiJvKrRDXQ7nCG19OqHKaR1q0WPXDFTh 8no59hnceAY/74FNnzWuC8PirvPwFo0sHU9sNoF5O+kQc7tuG3avOzf13hJZn+aCEGM9 Y5MsNJYSBayC4b6vEK+V2Yn0DN+Q3+Z9Txq7NXKpgH7gs5dsabuD00uSThIJtOhcwvPp MWf10761ieMwZKjuL2rdZZhX4zPKi8ZlZdBMNjRyj9LvMUP0rEf2bePHHWN0UJB1k3By iAjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O+QuFtDXTlDoUw38WR/cn/+Lvgq8nNlIRzIpExfHRWI=; b=RonkhLb4cKGFH5thUMkwPNPSnTtPgGV9FEkvVvMeSt/hmT5h45g9lcIxXh8ZhAStAR 10s/OoqotTNEj9jenf0A7vULyt/orEUP3Kcsq1xJU6HeZOOATywrOw/yd+5qxJE2PSyd GN6JR3yYaOiKrZdJiWOjaGbAHgnLRMJkscxzDJvN1k1aRdJcVI5nkrGsxLCOJokis5M+ LhKnz3RfX+ByAUuMbFdqxV76ybWvZGwpGybLhMmcG22x+jvKDUH/5PREeX2FXqlcQkpT sLrMKrdBx0UltBa29b12y/wLAiIWF1MJ/jxkLN6Mu/eRrfpKi+uIfGtgvbOx7yFKh5zF Ix5A== X-Gm-Message-State: AOAM532l5kzdmJS8GpR3JQ+OfpgSEoCTK07p5lht68YDwDUQsdEh4Wuv sQDms8gFrRTDPfdamxbXRL2vfj0419k8QdHiArQ08p89cA36+NqGFGR9NrAKWfUSRCS03voF+iu 4xxvoukjj+rVcyL65NKwgpw9TOAkofblrLKkTkkUOe9ddcUiTwTYtBQWfzbBGiEochg== X-Google-Smtp-Source: ABdhPJyAMQ5HJz4kh0sQ7Em2qyUhyiTAzhQrBsLj7P00mg1rhZge6SVtrICMIsDINtkw4RHXpkD4Tg== X-Received: by 2002:a1c:e910:: with SMTP id q16mr8452797wmc.188.1594815631216; Wed, 15 Jul 2020 05:20:31 -0700 (PDT) Return-Path: Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id 26sm3078142wmj.25.2020.07.15.05.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 05:20:30 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Michael D Kinney Subject: [PATCH edk2-platforms 2/4] Readme.md: update build parallellism information Date: Wed, 15 Jul 2020 13:20:25 +0100 Message-Id: <20200715122027.970-3-leif@nuviainc.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200715122027.970-1-leif@nuviainc.com> References: <20200715122027.970-1-leif@nuviainc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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