From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 04AEA21F3040D for ; Fri, 29 Sep 2017 07:16:17 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2017 07:19:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,452,1500966000"; d="scan'208";a="1225202578" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 29 Sep 2017 07:19:33 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Sep 2017 07:19:32 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Sep 2017 07:19:32 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.98]) with mapi id 14.03.0319.002; Fri, 29 Sep 2017 22:19:30 +0800 From: "Wei, David" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add option /m to enable multiple thread build Thread-Index: AQHTOSVkEyu+4UTFPketKSoAM3KO7aLL6YyQ Date: Fri, 29 Sep 2017 14:19:28 +0000 Message-ID: <89954A0B46707A448411A627AD4EEE3468F981BD@SHSMSX101.ccr.corp.intel.com> References: <1506691076-4920-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1506691076-4920-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add option /m to enable multiple thread build X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2017 14:16:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: zwei4 Thanks, David Wei Intel SSG/STO/UEFI BIOS =20 > -----Original Message----- > From: Zhu, Yonghong > Sent: Friday, September 29, 2017 9:18 PM > To: edk2-devel@lists.01.org > Cc: Wei, David > Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Add > option /m to enable multiple thread build >=20 > 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. >=20 > Cc: zwei4 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BuildBIOS.bat | 12 ++++++++++-- > Platform/BroxtonPlatformPkg/BuildBios.bat | 8 ++++++++ > Platform/BroxtonPlatformPkg/BuildIFWI.bat | 13 +++++++++++-- > 3 files changed, 29 insertions(+), 4 deletions(-) >=20 > diff --git a/BuildBIOS.bat b/BuildBIOS.bat > index 4bb4b03..baf7cdd 100644 > --- a/BuildBIOS.bat > +++ b/BuildBIOS.bat > @@ -10,10 +10,11 @@ set PlatformName=3D > set BuildTarget=3DDebug > set Compiler=3D/vs13 > set Arch=3D/x64 > set FabId=3D/B > set BoardId=3D/MN > +set buildthread=3D >=20 > :: Optional arguments > :OptLoop >=20 > if /i "%~1"=3D=3D"" goto Usage > @@ -84,22 +85,29 @@ if /i "%~1"=3D=3D"/BG" ( > echo. > shift > goto OptLoop > ) >=20 > +if /i "%~1"=3D=3D"/m" ( > + set buildthread=3D/m > + echo. > + shift > + goto OptLoop > +) > + > :: Required argument(s) > :: Require 2 input parameters > if "%~2"=3D=3D"" goto Usage >=20 > :: Assign required arguments > set PlatformName=3D%~1 > set BuildTarget=3D%~2 >=20 > :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% >=20 > goto Exit >=20 > :Usage > echo Usage: BuildBIOS.bat [options] ^ ^ > 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"=3D=3D"/BG" ( > echo. > shift > goto OptLoop > ) >=20 > +if /i "%~1"=3D=3D"/m" ( > + if defined NUMBER_OF_PROCESSORS ( > + set /a build_threads=3D%NUMBER_OF_PROCESSORS% > + ) > + shift > + goto OptLoop > +) > + > :: Required argument(s) > if "%~2"=3D=3D"" ( > 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=3D0 > set "Build_Flags=3D " > set Arch=3DX64 > set SkipUsageFlag=3DFALSE > set FabId=3DB > set BoardId=3DMN > +set buildthread=3D > set WORKSPACE=3D%CD% > if %WORKSPACE:~-1%=3D=3D\ ( > set WORKSPACE=3D%WORKSPACE:~0,-1% > ) > set CORE_PATH=3D%WORKSPACE%\Core > @@ -102,10 +103,18 @@ if /i "%~1"=3D=3D"/BG" ( > set Build_Flags=3D%Build_Flags% /BG > shift > goto OptLoop > ) >=20 > +if /i "%~1"=3D=3D"/m" ( > + set buildthread=3D/m > + echo. > + shift > + goto OptLoop > +) > + > + > :: Require 2 input parameters > if "%~2"=3D=3D"" ( > echo. & echo -- ERROR: Not Enough Arguments Provided > echo -- Please review the Help screen "/?" -- & echo. > goto exit > @@ -118,12 +127,12 @@ set Build_Target=3D%~2 > :: Build BIOS > echo > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > echo Build_IFWI: Calling BIOS build Script... > echo. >=20 > -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=3D1 > goto exit > ) > -- > 2.6.1.windows.1