From nobody Tue May 7 08:12:36 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1506691087237335.659111463306; Fri, 29 Sep 2017 06:18:07 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7F60D21D492F3; Fri, 29 Sep 2017 06:14:49 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 118AD2095BB74 for ; Fri, 29 Sep 2017 06:14:47 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2017 06:18:03 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.121]) by fmsmga001.fm.intel.com with ESMTP; 29 Sep 2017 06:18:02 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,452,1500966000"; d="scan'208";a="1200421406" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Fri, 29 Sep 2017 21:17:56 +0800 Message-Id: <1506691076-4920-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [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: , Cc: zwei4 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: zwei4 --- 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=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%=20 -call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %= BoardId% %FabId% /fspw %BuildFlags% MINN %BuildTarget%=20 +echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %buildthre= ad% %Compiler% %Arch% %BoardId% %FabId% /fspw %BuildFlags% MINN %BuildTarge= t%=20 +call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %buildthread% %Compi= ler% %Arch% %BoardId% %FabId% /fspw %BuildFlags% MINN %BuildTarget%=20 =20 goto Exit =20 :Usage echo Usage: BuildBIOS.bat [options] ^ ^ diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPl= atformPkg/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/BroxtonPl= atformPkg/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% %Platform_Typ= e% %Build_Target% +echo - call BuildBios.bat %buildthread% %Build_Flags% %Platform_Type% %Bui= ld_Target% +call %WORKSPACE%\%PLATFORM_PATH%\BuildBios.bat %buildthread% %Build_Flags%= %Platform_Type% %Build_Target% if ErrorLevel 1 ( echo echo -- Error Building BIOS & echo. set exitCode=3D1 goto exit ) --=20 2.6.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel