public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wei, David" <david.wei@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add option /m to enable multiple thread build
Date: Fri, 29 Sep 2017 14:19:28 +0000	[thread overview]
Message-ID: <89954A0B46707A448411A627AD4EEE3468F981BD@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1506691076-4920-1-git-send-email-yonghong.zhu@intel.com>

Reviewed-by: zwei4 <david.wei@intel.com>

Thanks,
David  Wei

Intel SSG/STO/UEFI BIOS                                 

> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Friday, September 29, 2017 9:18 PM
> To: edk2-devel@lists.01.org
> Cc: Wei, David <david.wei@intel.com>
> Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add
> option /m to enable multiple thread build
> 
> current in windows it takes ~10 minutes to build a image, so we add
> /m option to use EDK II build tool's multiple thread build function,
> it can save about half build time.
> 
> Cc: zwei4 <david.wei@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  BuildBIOS.bat                             | 12 ++++++++++--
>  Platform/BroxtonPlatformPkg/BuildBios.bat |  8 ++++++++
>  Platform/BroxtonPlatformPkg/BuildIFWI.bat | 13 +++++++++++--
>  3 files changed, 29 insertions(+), 4 deletions(-)
> 
> diff --git a/BuildBIOS.bat b/BuildBIOS.bat
> index 4bb4b03..baf7cdd 100644
> --- a/BuildBIOS.bat
> +++ b/BuildBIOS.bat
> @@ -10,10 +10,11 @@ set PlatformName=
>  set BuildTarget=Debug
>  set Compiler=/vs13
>  set Arch=/x64
>  set FabId=/B
>  set BoardId=/MN
> +set buildthread=
> 
>  :: Optional arguments
>  :OptLoop
> 
>  if /i "%~1"=="" goto Usage
> @@ -84,22 +85,29 @@ if /i "%~1"=="/BG" (
>      echo.
>      shift
>      goto OptLoop
>  )
> 
> +if /i "%~1"=="/m" (
> +    set buildthread=/m
> +    echo.
> +    shift
> +    goto OptLoop
> +)
> +
>  :: Required argument(s)
>  :: Require 2 input parameters
>  if "%~2"=="" goto Usage
> 
>  :: Assign required arguments
>  set PlatformName=%~1
>  set BuildTarget=%~2
> 
>  :OptLoopEnd
>  echo ---- Call Build Script of Broxton ----
> -echo calling :
> Platform\%PlatformName%PlatformPkg\BuildIFWI.bat  %Compiler% %Arch%
>  %BoardId% %FabId% /fspw %BuildFlags% MINN %BuildTarget%
> -call
> Platform\%PlatformName%PlatformPkg\BuildIFWI.bat  %Compiler% %Arch%
>  %BoardId% %FabId% /fspw %BuildFlags% MINN %BuildTarget%
> +echo calling :
> Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %buildthread% %Co
> mpiler% %Arch% %BoardId% %FabId% /fspw %BuildFlags%
> MINN %BuildTarget%
> +call
> Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %buildthread% %Co
> mpiler% %Arch% %BoardId% %FabId% /fspw %BuildFlags%
> MINN %BuildTarget%
> 
>  goto Exit
> 
>  :Usage
>  echo Usage: BuildBIOS.bat [options] ^<PlatformName^> ^<BuildTarget^>
> diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat
> b/Platform/BroxtonPlatformPkg/BuildBios.bat
> index 3ac411e..1e240e8 100644
> --- a/Platform/BroxtonPlatformPkg/BuildBios.bat
> +++ b/Platform/BroxtonPlatformPkg/BuildBios.bat
> @@ -177,10 +177,18 @@ if /i "%~1"=="/BG" (
>      echo.
>      shift
>      goto OptLoop
>  )
> 
> +if /i "%~1"=="/m" (
> +    if defined NUMBER_OF_PROCESSORS (
> +        set /a build_threads=%NUMBER_OF_PROCESSORS%
> +    )
> +    shift
> +    goto OptLoop
> +)
> +
>  :: Required argument(s)
>  if "%~2"=="" (
>     echo. & echo -- ERROR: Not Enough Arguments Provided
>     echo -- Please review the Help screen "/?" -- & echo.
>     goto ExitFail
> diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> index 1af0bf9..5042580 100644
> --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
> @@ -6,10 +6,11 @@ set exitCode=0
>  set "Build_Flags= "
>  set Arch=X64
>  set SkipUsageFlag=FALSE
>  set FabId=B
>  set BoardId=MN
> +set buildthread=
>  set WORKSPACE=%CD%
>  if %WORKSPACE:~-1%==\ (
>    set WORKSPACE=%WORKSPACE:~0,-1%
>  )
>  set CORE_PATH=%WORKSPACE%\Core
> @@ -102,10 +103,18 @@ if /i "%~1"=="/BG" (
>      set Build_Flags=%Build_Flags% /BG
>      shift
>      goto OptLoop
>  )
> 
> +if /i "%~1"=="/m" (
> +    set buildthread=/m
> +    echo.
> +    shift
> +    goto OptLoop
> +)
> +
> +
>  :: Require 2 input parameters
>  if "%~2"=="" (
>     echo. & echo -- ERROR: Not Enough Arguments Provided
>     echo -- Please review the Help screen "/?" -- & echo.
>     goto exit
> @@ -118,12 +127,12 @@ set Build_Target=%~2
>  :: Build BIOS
>  echo
> ==========================================================
> ======================
>  echo Build_IFWI:  Calling BIOS build Script...
>  echo.
> 
> -echo - call BuildBios.bat %Build_Flags% %Platform_Type% %Build_Target%
> -
> call %WORKSPACE%\%PLATFORM_PATH%\BuildBios.bat %Build_Flags% %Pla
> tform_Type% %Build_Target%
> +echo - call
> BuildBios.bat %buildthread% %Build_Flags% %Platform_Type% %Build_Targe
> t%
> +call %WORKSPACE%\%PLATFORM_PATH%\BuildBios.bat %buildthread% %B
> uild_Flags% %Platform_Type% %Build_Target%
>  if ErrorLevel 1 (
>      echo echo  -- Error Building BIOS  & echo.
>      set exitCode=1
>      goto exit
>  )
> --
> 2.6.1.windows.1



      reply	other threads:[~2017-09-29 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 13:17 [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add option /m to enable multiple thread build Yonghong Zhu
2017-09-29 14:19 ` Wei, David [this message]

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=89954A0B46707A448411A627AD4EEE3468F981BD@SHSMSX101.ccr.corp.intel.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