From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 EF8132034CF7D for ; Sun, 29 Oct 2017 19:11:49 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2017 19:15:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,317,1505804400"; d="scan'208";a="1030987031" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 29 Oct 2017 19:15:38 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 29 Oct 2017 19:15:38 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 29 Oct 2017 19:15:37 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Mon, 30 Oct 2017 10:15:32 +0800 From: "Wei, David" To: "Lu, ShifeiX A" , "edk2-devel@lists.01.org" CC: "Jarlstrom, Laurie" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script. Thread-Index: AQHTUSKrE4TC1iIwmk6ypphm534S1qL7p3xA Date: Mon, 30 Oct 2017 02:15:31 +0000 Message-ID: <89954A0B46707A448411A627AD4EEE3468FB4012@SHSMSX101.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzgyNTY4NDAtN2MzYy00NTdhLThhMTYtMWRmM2UwNzJjODYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJYbmpGMWxTY0FrQ2xxbzFHSlEyaFdcL2dnM1ZaMnBuQ2ZUQklOSVhxbm1yTGNmeSs2NnpMaUp1Q2JHMnhzXC9zOXIifQ== x-ctpclassification: CTP_IC 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] Build script. 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: Mon, 30 Oct 2017 02:11:50 -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: Lu, ShifeiX A > Sent: Monday, October 30, 2017 9:59 AM > To: edk2-devel@lists.01.org > Cc: Wei, David > Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script. >=20 > Enhance build script. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jarlstrom, Laurie > Signed-off-by: lushifex > --- > BuildBIOS.bat | 104 +---- > BuildBIOS.sh | 28 +- > Platform/BroxtonPlatformPkg/BuildBios.bat | 613 ---------------------= ------ > Platform/BroxtonPlatformPkg/BuildBios.sh | 333 --------------- > Platform/BroxtonPlatformPkg/BuildBxtBios.bat | 612 > ++++++++++++++++++++++++++ > Platform/BroxtonPlatformPkg/BuildBxtBios.sh | 333 +++++++++++++++ > Platform/BroxtonPlatformPkg/BuildIFWI.bat | 12 +- > Platform/BroxtonPlatformPkg/BuildIFWI.sh | 16 +- > 8 files changed, 1003 insertions(+), 1048 deletions(-) > delete mode 100644 Platform/BroxtonPlatformPkg/BuildBios.bat > delete mode 100644 Platform/BroxtonPlatformPkg/BuildBios.sh > create mode 100644 Platform/BroxtonPlatformPkg/BuildBxtBios.bat > create mode 100644 Platform/BroxtonPlatformPkg/BuildBxtBios.sh >=20 > diff --git a/BuildBIOS.bat b/BuildBIOS.bat > index baf7cdd..7b2394f 100644 > --- a/BuildBIOS.bat > +++ b/BuildBIOS.bat > @@ -1,18 +1,12 @@ > @echo off > echo %date% %time% > echo. > +setlocal EnableDelayedExpansion EnableExtensions >=20 > set exitCode=3D0 > -set WORKSPACE=3D%CD% > -set CORE_PATH=3D%CD% > set BuildFlags=3D > -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 > + > +set thisscript=3D%0 >=20 > :: Optional arguments > :OptLoop > @@ -20,82 +14,15 @@ set buildthread=3D > if /i "%~1"=3D=3D"" goto Usage > if /i "%~1"=3D=3D"/?" goto Usage >=20 > -if /i "%~1"=3D=3D"/IA32" ( > - set Arch=3D/IA32 > - shift > - goto OptLoop > -) > - > -if /i "%~1"=3D=3D"/x64" ( > - set Arch=3D/x64 > - shift > - goto OptLoop > -) > - > -if /i "%~1"=3D=3D"/vs08" ( > - set Compiler=3D/vs08 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs10" ( > - set Compiler=3D/vs10 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs12" ( > - set Compiler=3D/vs12 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs13" ( > - set Compiler=3D/vs13 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs15" ( > - set Compiler=3D/vs15 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/A" ( > - set FabId=3D/A > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/B" ( > - set FabId=3D/B > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/MN" ( > - set BoardId=3D/MN > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/BG" ( > - set BoardId=3D/BG > - echo. > - shift > - goto OptLoop > -) > - > -if /i "%~1"=3D=3D"/m" ( > - set buildthread=3D/m > - echo. > +set BuildOption=3D%~1 > +if "!BuildOption:~0,1!"=3D=3D"/" ( > + set BuildFlags=3D%BuildFlags% %BuildOption% > shift > goto OptLoop > ) >=20 > :: Required argument(s) > -:: Require 2 input parameters > +:: Require 2 input parameters , first parameter without a "/" is Platfor= m > Name > if "%~2"=3D=3D"" goto Usage >=20 > :: Assign required arguments > @@ -104,17 +31,26 @@ set BuildTarget=3D%~2 >=20 > :OptLoopEnd > echo ---- Call Build Script of Broxton ---- > -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% > + > +if not exist Platform\%PlatformName%PlatformPkg\BuildIFWI.bat ( > + echo Platform %PlatformName%PlatformPkg does not exist > + echo. & echo Error - Unsupported Platform name: %1 > + echo. > + goto Usage > +) > + > +echo calling : > Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %BuildFlags% /fspw > MINN %BuildTarget% > +call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %BuildFlags% > /fspw MINN %BuildTarget% >=20 > goto Exit >=20 > :Usage > -echo Usage: BuildBIOS.bat [options] ^ ^ > +echo Usage: %thisscript% [options] ^ ^ > echo. > echo Options: > echo. /? Display this help text > echo. > +echo /m Set the build thread count to number of processors > echo /vs13 Set Compiler to vs2013 build (default: vs2013) > echo /x64 Set Arch to X64 (default: X64) > echo /IA32 Set Arch to IA32 (default: X64) > @@ -126,7 +62,7 @@ echo PlatformName: Broxton > echo BuildTargets: Release, Debug >=20 > echo Examples: > -echo BuildBIOS.bat /vs13 /B /x64 Broxton Debug > +echo %thisscript% /vs13 /B /x64 Broxton Debug >=20 > set exitCode=3D1 >=20 > diff --git a/BuildBIOS.sh b/BuildBIOS.sh > index aea8daa..5ea0dd8 100755 > --- a/BuildBIOS.sh > +++ b/BuildBIOS.sh > @@ -16,7 +16,7 @@ function Usage () { > echo > echo "Script to build BIOS firmware and stitch the entire IFWI." > echo > - echo "Usage: BuildBIOS.sh Build_Flags [PlatformName] Target_Flag" > + echo "Usage: BuildBios.sh Build_Flags [PlatformName] Target_Flag" > echo > echo " Build_Flags: /MN Minnow3 Board (defaul= t: MN)" > echo " Build_Flags: /BG Benson Glacier Board" > @@ -51,7 +51,11 @@ fi > ## Build Flags > for (( i=3D1; i<=3D$#; )) > do > - if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then > + if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/MN" ]; then > + BoardId=3DMN > + Build_Flags=3D"$Build_Flags /MN" > + shift > + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then > BoardId=3DBG > Build_Flags=3D"$Build_Flags /BG" > shift > @@ -68,14 +72,22 @@ for (( i=3D1; i<=3D$#; )) > fi > done >=20 > -Target_Flag=3DRelease > +if [ "$1" =3D=3D "Broxton" ]; then > + shift > + else > + echo "No parameter for board : assume Broxton" > +fi > + > +Target_Flag=3DDebug > + > if [ "$1" =3D=3D "Debug" ]; then > Target_Flag=3DDebug > - shift > -fi > -if [ "$1" =3D=3D "Release" ]; then > +elif [ "$1" =3D=3D "Release" ]; then > Target_Flag=3DRelease > - shift > +else > + echo "Error - Invalid Target" > + echo " Please review the Help screen" > + Usage > fi >=20 > echo $Build_Flags > @@ -84,7 +96,7 @@ echo $Target_Flag > export WORKSPACE=3D`pwd` > export > PACKAGES_PATH=3D$WORKSPACE:$WORKSPACE/Core:$WORKSPACE/Silicon/: > $WORKSPACE/Platform:$WORKSPACE/Platform/BroxtonPlatformPkg:$WOR > KSPACE/Silicon/BroxtonSoC:$WORKSPACE/Platform/BroxtonPlatformPkg/Co > mmon >=20 > -. edksetup.sh > +. edksetup.sh BaseTools >=20 > make -C BaseTools >=20 > diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat > b/Platform/BroxtonPlatformPkg/BuildBios.bat > deleted file mode 100644 > index 04fe6cc..0000000 > --- a/Platform/BroxtonPlatformPkg/BuildBios.bat > +++ /dev/null > @@ -1,613 +0,0 @@ > -@echo off > -::echo on > -setlocal EnableDelayedExpansion EnableExtensions > -echo. > -echo %date% %time% > -echo. > - > - > ::********************************************************* > ************* > -:: Initial Setup > - > ::********************************************************* > ************* > -set WORKSPACE=3D%CD% > -if %WORKSPACE:~-1%=3D=3D\ ( > - set WORKSPACE=3D%WORKSPACE:~0,-1% > -) > -set CORE_PATH=3D%WORKSPACE%\Core > -set PLATFORM_PATH=3DPlatform\BroxtonPlatformPkg > -set SILICON_PATH=3DSilicon\BroxtonSoC > -set > AslPath=3D%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Iasl\iasl.exe > -set > PACKAGES_PATH=3D%CORE_PATH%;%WORKSPACE%\Silicon\;%WORKSPACE% > \Platform;%WORKSPACE%\%PLATFORM_PATH%;%WORKSPACE%\%SILICON > _PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common ; > -set EDK_TOOLS_BIN=3D%WORKSPACE%\BaseTools\Bin\Win32 > -set /a build_threads=3D1 > -set "Nasm_Flags=3D-D ARCH_IA32 -D DEBUG_PORT80" > -set "Build_Flags=3D " > -set exitCode=3D0 > -set Arch=3DX64 > -set Compiler=3DVS2013 > -set FabId=3DB > -set BoardId=3DMN > -if not defined BiosVersion set BiosVersion=3DDEV > - > - > -:: Clean up previous build files. > -echo Clean up old build files... > -if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log > -if exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.l= og > -if exist %WORKSPACE%\Conf\target.txt > del %WORKSPACE%\Conf\target.txt > -if exist %WORKSPACE%\Conf\tools_def.txt > del %WORKSPACE%\Conf\tools_def.txt > -if exist %WORKSPACE%\Conf\build_rule.txt > del %WORKSPACE%\Conf\build_rule.txt > -if exist %WORKSPACE%\Conf\FrameworkDatabase.db > del %WORKSPACE%\Conf\FrameworkDatabase.db > -if exist %WORKSPACE%\Stitch\*.bin del %WORKSPACE%\Stitch\*.= bin > -if exist conf\.cache rmdir /q/s conf\.cache > - > - > -:: Override tools_def.txt > -echo Creating Conf folder and build config files... > -if not exist %WORKSPACE%\Conf md %WORKSPACE%\Conf > -copy > /y %CORE_PATH%\BaseTools\Conf\*.template %WORKSPACE%\Conf\*.txt > -copy > /y %WORKSPACE%\%PLATFORM_PATH%\DeviceCommonPkg\Override\Bas > eTools\Conf\tools_def.template %WORKSPACE%\Conf\tools_def.txt > - > -:: Setup EDK environment. Edksetup puts new copies of target.txt, > tools_def.txt, build_rule.txt in WorkSpace\Conf > -:: Also run edksetup as soon as possible to avoid it from changing > environment variables we're overriding > -set "VCINSTALLDIR=3D" > -set EDK_TOOLS_PATH=3D%WORKSPACE%\BaseTools > -call edksetup.bat > -@echo off > - > -set Minnow_RVP=3DMINN > - > -:: Initialize all the build flags to FALSE > -:: Then based on the cmd line input, some will be set to TRUE prior to > building. > -:: Note: These variable names match the actual Build Macro names in DSC > for clarity. > -set ENBDT_PF_BUILD=3DFALSE > -set SrcDebug=3DFALSE > -set APLK_SETUP_ENABLE_BUILD=3DFALSE > -set FSP_BUILD=3DFALSE > -set FSP_WRAPPER=3DFALSE > - > -:: Set Defaults of platform specific environment variables. > -set EFI_SOURCE=3D%CD% > -set EDK_SOURCE=3D%CD% > -set PLATFORM_NAME=3DBxtPlatformPkg > -set PLATFORM_PACKAGE=3D%PLATFORM_PATH%\BxtPlatformPkg > -set PLATFORM_RC_PACKAGE=3DSilicon\BroxtonSoC\BroxtonSiPkg > -set > COMMON_PLATFORM_PACKAGE=3D%PLATFORM_PATH%\BxtPlatformPkg > -set FSP_BIN_PKG_NAME=3DBroxtonFspBinPkg > -set > STITCH_PATH=3D%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Stitch > - > - > PATH=3D%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Gen > BiosId;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\nasm\Win32 > - > PATH=3D%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\FCE; > %WORKSPACE%\%PLATFORM_PATH%\Common\Tools\nasm\Win32 > - > - > ::********************************************************* > ************* > -:: Parse command line arguments > - > ::********************************************************* > ************* > - > -:: Optional arguments > -:OptLoop > -if /i "%~1"=3D=3D"" goto Usage > -if /i "%~1"=3D=3D"/?" goto Usage > - > -if /i "%~1"=3D=3D"/l" ( > - set Build_Flags=3D%Build_Flags% -j EDK2.log > - shift > - goto OptLoop > -) > -if /i "%~1" =3D=3D "/c" ( > - echo Removing previous Build files... > - if exist build ( > - del /f/s/q build > nul > - rmdir /s/q build > - ) > - if exist Conf\.cache ( > - del /f/s/q Conf\.cache > nul > - rmdir /s/q Conf\.cache > - ) > - echo. > - shift > - goto OptLoop > -) > - > -if /i "%~1"=3D=3D"/ia32" ( > - set Arch=3DIA32 > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/x64" ( > - set Arch=3DX64 > - shift > - goto OptLoop > -) > - > -if /i "%~1"=3D=3D"/vs08" ( > - set Compiler=3DVS2008 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs10" ( > - set Compiler=3DVS2010 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs12" ( > - set Compiler=3DVS2012 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs13" ( > - set Compiler=3DVS2013 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/vs15" ( > - set Compiler=3DVS2015 > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/FspW" ( > - set FSP_WRAPPER=3DTRUE > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/A" ( > - set FabId=3DA > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/B" ( > - set FabId=3DB > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/MN" ( > - set BoardId=3DMN > - echo. > - shift > - goto OptLoop > -) > -if /i "%~1"=3D=3D"/BG" ( > - set BoardId=3DBG > - echo. > - shift > - goto OptLoop > -) > - > -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 > -) > - > -echo. & echo -- Setting compiler to %Compiler% -- & echo. > - > -:: BOARD_ID needs to be exactly 7 characters (GenBiosId.exe limitation) > -echo Setting %1 platform configuration and BIOS ID... > -if /i "%~1" =3D=3D "%Minnow_RVP%" ( > - if %BoardId%=3D=3DMN ( > - set BOARD_ID=3DMINNOW3 > - ) else if %BoardId%=3D=3DBG ( > - set BOARD_ID=3DBENSONV > - ) > - set ENBDT_PF_BUILD=3DTRUE > - set PLATFORM_NAME=3DBroxtonPlatformPkg > - set PLATFORM_PACKAGE=3D%PLATFORM_PATH% > - set APLK_SETUP_ENABLE_BUILD=3DTRUE > -) else ( > - echo. & echo Error - Unsupported PlatformType: %1 > - echo Please review the Help screen "/?" & echo. > - goto ExitFail > -) > -set Platform_Type=3D%~1 > - > -:: > -:: Tack on BIOS Version > -:: > - > - > ::********************************************************* > ************* > -:: Additional EDK Build Setup/Configuration > - > ::********************************************************* > ************* > - > -::Setup DefineAtBuildMacros config file > -set Build_Macros=3D.\%PLATFORM_PACKAGE%\DefineAtBuildMacros.dsc > -copy /y nul %Build_Macros% >nul > - > -::output platform specific build macros to DefineAtBuildMacros.dsc > -echo DEFINE ENBDT_PF_BUILD > =3D %ENBDT_PF_BUILD% >> %Build_Macros% > - > -echo DEFINE APLK_SETUP_ENABLE_BUILD > =3D %APLK_SETUP_ENABLE_BUILD% >> %Build_Macros% > - > -if "%Arch%"=3D=3D"IA32" ( > - echo DEFINE X64_CONFIG =3D FALSE >>= %Build_Macros% > -) else if "%Arch%"=3D=3D"X64" ( > - echo DEFINE X64_CONFIG =3D TRUE >>= %Build_Macros% > -) > - > -::Stage of copy of BiosId.env in Conf/ with Platform_Type and Build_Targ= et > values removed > - > -if "%Arch%"=3D=3D"X64" ( > - findstr /b /v "BOARD_ID BUILD_TYPE > BOARD_REV" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env > -) else if "%Arch%"=3D=3D"IA32" ( > - findstr /b /v "BOARD_ID BUILD_TYPE BOARD_REV > BOARD_EXT" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env > - echo BOARD_EXT =3D I32 >> Conf\BiosId.env > -) > - > -if /i "%~2" =3D=3D "RELEASE" ( > - set target=3DRELEASE > - echo BUILD_TYPE =3D R >> Conf\BiosId.env > -) else ( > - set target=3DDEBUG > - echo BUILD_TYPE =3D D >> Conf\BiosId.env > -) > - > -if %BoardId%=3D=3DBG ( > - echo BOARD_REV =3D A >> Conf\BiosId.env > -) > - > -if %BoardId%=3D=3DMN ( > - if %FabId%=3D=3DB ( > - echo BOARD_REV =3D B >> Conf\BiosId.env > - ) else ( > - echo BOARD_REV =3D A >> Conf\BiosId.env > - ) > -) > - > -:: Set the Build_Type, Version_Major, and Version_Minor environment > variables > -find /v "#" Conf\BiosId.env > ver_strings > -for /f "tokens=3D1,3" %%i in (ver_strings) do set %%i=3D%%j > -del /f/q ver_strings >nul > -:: Do this after parsing "ver_strings" > -echo BOARD_ID =3D %BOARD_ID% >> Conf\BiosId.env > - > -echo. > -echo Setting the Build environment for Visual Studio... > -if "%Compiler%"=3D=3D"VS2008" ( > - if defined VS90COMNTOOLS ( > - call "%VS90COMNTOOLS%\vsvars32.bat" >nul > - if /I "%VS90COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual S= tudio > 9.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2008 > - ) else set TOOL_CHAIN_TAG=3DVS2008x86 > - ) else ( > - echo --ERROR: VS2008 not installed correctly. VS90COMNTOOLS not > defined ^^! > - goto BldFail > - ) > -) else if "%Compiler%"=3D=3D"VS2010" ( > - if defined VS100COMNTOOLS ( > - call "%VS100COMNTOOLS%\vsvars32.bat" >nul > - if /I "%VS100COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual = Studio > 10.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2010 > - ) else set TOOL_CHAIN_TAG=3DVS2010x86 > - ) else ( > - echo --ERROR: VS2010 not installed correctly. VS100COMNTOOLS not > defined ^^! > - goto BldFail > - ) > -) else if "%Compiler%"=3D=3D"VS2012" ( > - if defined VS110COMNTOOLS ( > - call "%VS110COMNTOOLS%\vsvars32.bat" >nul > - if /I "%VS110COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual = Studio > 11.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2012 > - ) else set TOOL_CHAIN_TAG=3DVS2012x86 > - ) else ( > - echo --ERROR: VS2012 not installed correctly. VS110COMNTOOLS not > defined ^^! > - goto BldFail > - ) > -) else if "%Compiler%"=3D=3D"VS2013" ( > - if defined VS120COMNTOOLS ( > - call "%VS120COMNTOOLS%\vsvars32.bat" >nul > - if /I "%VS120COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual = Studio > 12.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2013 > - ) else set TOOL_CHAIN_TAG=3DVS2013x86 > - ) else ( > - echo --ERROR: VS2013 not installed correctly. VS120COMNTOOLS not > defined ^^! > - echo See help ^(/?^) for how specify a different VS versi= on. > - goto BldFail > - ) > -) else if "%Compiler%"=3D=3D"VS2015" ( > - if defined VS140COMNTOOLS ( > - call "%VS140COMNTOOLS%\vsvars32.bat" >nul > - if /I "%VS140COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual = Studio > 14.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2015 > - ) else set TOOL_CHAIN_TAG=3DVS2015x86 > - > - ) else ( > - echo --ERROR: VS2015 not installed correctly. VS140COMNTOOLS not > defined ^^! > - echo See help ^(/?^) for how specify a different VS versi= on. > - goto BldFail > - ) > -) > - > - > ::********************************************************* > ************* > -:: Build BIOS > - > ::********************************************************* > ************* > - > -echo Setup build directory for GenBiosId... > -set > BUILD_PATH=3DBuild\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG% > -if not exist %BUILD_PATH%\IA32 mkdir %BUILD_PATH%\IA32 > - > -echo Creating BiosId... > -GenBiosId.exe -i Conf\BiosId.env -o %BUILD_PATH%\IA32\BiosId.bin -ob > Conf\BiosId.bat > -if "%Arch%"=3D=3D"X64" ( > - if not exist %BUILD_PATH%\X64 mkdir %BUILD_PATH%\X64 > - GenBiosId.exe -i Conf\BiosId.env -o %BUILD_PATH%\X64\BiosId.bin -ob > Conf\BiosId.bat > -) else if "%Arch%"=3D=3D"IA32" ( > - if not exist %BUILD_PATH%\IA32 mkdir %BUILD_PATH%\IA32 > - GenBiosId.exe -i Conf\BiosId.env -o %BUILD_PATH%\IA32\BiosId.bin -ob > Conf\BiosId.bat > -) > - > -if ErrorLevel 1 goto BldFail > - > -echo Building ResetVector... > - > -set > ResetVectorPath=3D%WORKSPACE%\%PLATFORM_RC_PACKAGE%\Cpu\Reset > Vector > - > -pushd %ResetVectorPath%\Vtf0 > - nasm.exe %Nasm_Flags% -o Bin\ResetVector.ia32.port80.raw > ResetVectorCode.asm > - > python %CORE_PATH%\UefiCpuPkg\ResetVector\Vtf0\Tools\FixupForRawS > ection.py Bin\ResetVector.ia32.port80.raw > -popd > - > -pushd %ResetVectorPath%\Vtf1 > - nasm.exe %Nasm_Flags% -o Bin\ResetVector.ia32.port80.raw > ResetVectorCode.asm > - > python %CORE_PATH%\UefiCpuPkg\ResetVector\Vtf0\Tools\FixupForRawS > ection.py Bin\ResetVector.ia32.port80.raw > -popd > - > -:: SaveWorkSpace w/a is needed when using subst for Workspace builds (eg= . > R:/) > -set SaveWorkSpace=3D%WORKSPACE% > -set WORKSPACE=3D%CD% > -if "%Arch%"=3D=3D"X64" ( > -set ActivePlatform=3D%PLATFORM_PACKAGE%\PlatformPkgX64.dsc > -) else if "%Arch%"=3D=3D"IA32" ( > -set ActivePlatform=3D%PLATFORM_PACKAGE%\PlatformPkgIA32.dsc > -) > - > -echo Modifying Conf files for this build... > -:: Remove lines with these tags from target.txt > -findstr /V "TARGET TARGET_ARCH TOOL_CHAIN_TAG ACTIVE_PLATFORM > MAX_CONCURRENT_THREAD_NUMBER" Conf\target.txt > > Conf\target.txt.tmp > - > -if "%Arch%"=3D=3D"IA32" ( > - echo TARGET_ARCH =3D IA32 >> Conf\t= arget.txt.tmp > -) else if "%Arch%"=3D=3D"X64" ( > - echo TARGET_ARCH =3D IA32 X64 >> Conf\t= arget.txt.tmp > -) > -echo TARGET =3D %TARGET% >> Conf\t= arget.txt.tmp > -echo TOOL_CHAIN_TAG =3D %TOOL_CHAIN_TAG% >> > Conf\target.txt.tmp > -echo ACTIVE_PLATFORM =3D %ActivePlatform% >> > Conf\target.txt.tmp > -echo MAX_CONCURRENT_THREAD_NUMBER =3D %build_threads% >> > Conf\target.txt.tmp > - > -move /Y Conf\target.txt.tmp Conf\target.txt >nul > -echo *_VS2008x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > -echo *_VS2010x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > -echo *_VS2012x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > -echo *_VS2013x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > -echo *_VS2015x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > - > -echo. > -echo Invoking normal EDK2 build... > -build %Build_Flags% > -if ErrorLevel 1 goto BldFail > - > -set WORKSPACE=3D%SaveWorkSpace% > - > - > ::********************************************************* > ************* > -:: Post Build processing and cleanup > - > ::********************************************************* > ************* > -echo Create FlashMap.h... > - > -set PLAT_INIT_PRE_MEM=3DPlatformPreMemPei > - > -set > AutoGenPath=3D%BUILD_PATH%\IA32\BroxtonPlatformPkg\Common\Platfor > mSettings\PlatformPreMemPei\%PLAT_INIT_PRE_MEM%\DEBUG\AutoGen > .h > - > -if not exist "%AutoGenPath%" ( > - echo ERROR: Couldn't find %AutoGenPath% so we can generate > FlashMap.h > - goto BldFail > -) > -findstr /L "_PCD_VALUE_" %AutoGenPath% > %STITCH_PATH%\FlashMap.h > - > -echo Running FCE... > -copy /b %BUILD_PATH%\FV\FvIBBM.fv + /b %BUILD_PATH%\FV\Soc.fd > /b %BUILD_PATH%\FV\Temp.fd > -:: Extract Hii data from build and store a copy in HiiDefaultData.txt > -:: UQI 0006 005C 0078 0030 0031 0030 0031 is for question > prompt(STR_IPU_ENABLED) > -:: First 0006 is the length of string; Next six byte values are mapped t= o > STR_IPU_ENABLED string value defined in > Platform\BroxtonPlatformPkg\Common\PlatformSettings\PlatformSetupDx > e\VfrStrings.uni. > -fce.exe read -i %BUILD_PATH%\FV\Temp.fd 0006 005C 0078 0030 0031 0030 > 0031 > %BUILD_PATH%\FV\HiiDefaultData.txt 2>>EDK2.log > -:: Generate the Setup variable and save changes to BxtXXX.fd > -:: B73FE497-B92E-416e-8326-45AD0D270091 is the GUID of IBBM FV > -fce.exe update -i %BUILD_PATH%\FV\Temp.fd - > s %BUILD_PATH%\FV\HiiDefaultData.txt - > o %BUILD_PATH%\FV\Bxt%Arch%.fd -g B73FE497-B92E-416e-8326- > 45AD0D270091 -a 1>>EDK2.log 2>&1 > -split -f %BUILD_PATH%\FV\Bxt%Arch%.fd -s 0x35000 - > o %BUILD_PATH%\FV\FvIBBM.fv > - > -if ErrorLevel 1 goto BldFail > - > -@echo off > - > -:: Translate Release Build Type > -if "%BUILD_TYPE%"=3D=3D"R" set BUILD_TYPE=3DR > - > -echo Copy BIOS... > -set > BIOS_Name=3D%BOARD_ID%%BOARD_REV%_%Arch%_%BUILD_TYPE%_%VE > RSION_MAJOR%_%VERSION_MINOR% > -copy > /y/b %BUILD_PATH%\FV\Soc.fd %STITCH_PATH%\%BIOS_Name%.ROM > >nul > -copy > /y %STITCH_PATH%\FlashMap.h %STITCH_PATH%\%BIOS_Name%.map > >nul > - > -set Storage_Folder=3D%STITCH_PATH%\%BIOS_Name% > -if not exist %Storage_Folder% mkdir %Storage_Folder% > - > -copy /y/b %BUILD_PATH%\FV\FvIBBL.fv %Storage_Folder% >nul > -copy /y/b %BUILD_PATH%\FV\FvIBBM.fv %Storage_Folder% >nul > -copy /y/b %BUILD_PATH%\FV\FvIBBR.fv %Storage_Folder% >nul > -copy /y/b %BUILD_PATH%\FV\FvOBB.fv %Storage_Folder% >nul > -copy /y/b %BUILD_PATH%\FV\FvOBBX.fv %Storage_Folder% >nul > -copy /y/b %BUILD_PATH%\FV\FvOBBY.fv %Storage_Folder% >nul > - > -if /i "%FSP_WRAPPER%" =3D=3D "TRUE" ( > -:: 0xFEF7A000 =3D gIntelFsp2WrapperTokenSpaceGuid.PcdFlashFvFspBase =3D > $(CAR_BASE_ADDRESS) + $(BLD_RAM_DATA_SIZE) + > $(FSP_RAM_DATA_SIZE) + $(FSP_EMP_DATA_SIZE) + $(BLD_IBBM_SIZE) > - > pushd %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBi > nPkg\FspBin > - python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py rebase -f > Fsp.fd -c m -b 0xFEF7A000 -o .\ -n ApolloLakeFsp.fd > - python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py split -f > ApolloLakeFsp.fd -o .\ -n FSP.Fv > - popd > - copy > /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBin > Pkg\FspBin\FSP_T.Fv %Storage_Folder%\FSP_T.Fv > - copy > /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBin > Pkg\FspBin\FSP_M.Fv %Storage_Folder%\FSP_M.Fv > - copy > /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBin > Pkg\FspBin\FSP_S.Fv %Storage_Folder%\FSP_S.Fv > -) > - > -echo Get NvStorage Base and Size... > -if not exist "%STITCH_PATH%\FlashMap.h" ( > - echo ERROR: Couldn't find %STITCH_PATH%\FlashMap.h > - goto BldFail > -) > - > -::generate NvStorage.Fv > -:: %STITCH_PATH%\FlashMap.h has the information for the magic > numbers below. Parse it. > -:: You'll need to account for both hex (0x000000) and int (123456= 7U) > value types > -:: FLASH_REGION_VPD_OFFSET > -:: _PCD_VALUE_PcdFlashNvStorageBase - > _PCD_VALUE_PcdFlashBaseAddress > -:: FLASH_REGION_VPD_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE > -:: _PCD_VALUE_PcdFlashNvStorageSize > -:: > -:: PCD to find Variable Fi= le to search > - > ::=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=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > - call :FindPcdInFile _PCD_VALUE_PcdFlashNvStorageBase NvStorageBase > "%STITCH_PATH%\FlashMap.h" > - call :FindPcdInFile _PCD_VALUE_PcdFlashBaseAddress BaseAddress > "%STITCH_PATH%\FlashMap.h" > - call :FindPcdInFile _PCD_VALUE_PcdFlashNvStorageSize NvStorageSize > "%STITCH_PATH%\FlashMap.h" > -:: Find image offset as opposed to memory offset > - PowerShell ($env:NvStorageBase - $env:BaseAddress) > temp.pcd > - set /p VpdOffset=3D - del /f /q temp.pcd > -:: Force the variables we care about into DEC string format > - set VpdSize=3D%NvStorageSize% > - call :ForceToDec VpdOffset > - call :ForceToDec VpdSize > -:: Dump what we found > - echo - NvStorageBase =3D %NvStorageBase% > - echo - BaseAddress =3D %BaseAddress% > - echo - NvStorageSize =3D %NvStorageSize% > - echo - VpdOffset =3D %VpdOffset% > - echo - VpdSize =3D %VpdSize% > - > -:: Create NvStorage.fv > - echo Create NvStorage.fv... > - pushd %STITCH_PATH% > - REM This -s offset must equal the decimal value of > FLASH_REGION_VPD_OFFSET in the Platform.fdf > - Split.exe -f %STITCH_PATH%\%BIOS_Name%.ROM -s %VpdOffset% -o > temp1.bin -t temp2.bin > - REM This -s offset must equal the decimal value of > - REM FLASH_REGION_VPD_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE > - Split.exe -f temp2.bin -s %VpdSize% -o %Storage_Folder%\NvStorage.Fv= - > t temp3.bin > - del /F/Q temp1.bin temp2.bin temp3.bin > - popd > - > -echo. > -echo Build location: %BUILD_PATH% > -echo BIOS ROM Created: %BIOS_Name% > -echo. > -echo --------------- The EDKII BIOS build has successfully completed. --= --------- > ---- > -echo. > -goto Exit > - > -:: > -:: Find PCD value (%~1) in a file (%~3) and return it in a variable (%~2= ) as a > HEX string > -:: > -:: USAGE: call :FindPcdInFile PCD Variable File > -:FindPcdInFile > - call :GetPcd "%~1" "%~2" "%~3" > - call :ForceToHex "%~2" > -goto :EOF > - > -:: > -:: Find PCD value (%~1) in a file (%~3) and return it in a variable (%~2= ) > -:: > -:: USAGE: call :GetPcd PCD Variable File > -:GetPcd > - set _TargetFile=3D%~3 > - if not exist "%_TargetFile%" ( > - echo ERROR: Couldn't find %_TargetFile%^! > - set ExitCode=3D1 > - ) else ( > - for /f "tokens=3D3" %%a in ('findstr /C:"%~1" "%_TargetFile%"') do ( > - set _TestValue=3D%%~a > - set _PcdValue=3D!_TestValue:~0,-1! > - ) > - set %~2=3D!_PcdValue! > - echo %2 %_PcdValue% > - ) > - set _TargetFile=3D > - set _TestValue=3D > - set _PcdValue=3D > -goto :EOF > - > -:: > -:: Force value of %1 into hex format 0x1234 > -:: > -:: USAGE: call :ForceToHex Variable > -:ForceToHex > - call set _Temp=3D%%%~1%% > - if "%_Temp:~0,2%" =3D=3D "0x" goto :ForceToHexExit > - PowerShell ('0x' + [convert]::tostring($env:_Temp, 16).ToUpper()) > > temp.pcd > - set /p %~1=3D - del /f /q temp.pcd > -:ForceToHexExit > - set _Temp=3D > -goto :EOF > - > -:: > -:: Force value of %1 into decimal format > -:: > -:: USAGE: call :ForceToDec Variable > -:ForceToDec > - call set _Temp=3D%%%~1%% > - if not "%_Temp:~0,2%" =3D=3D "0x" goto :ForceToDecExit > - PowerShell ([convert]::toInt64((Get-Item env:_Temp).value, 16)) > > temp.pcd > - set /p %~1=3D - del /f /q temp.pcd > -:ForceToDecExit > - set _Temp=3D > -goto :EOF > - > -:Usage > -echo. > -echo > ********************************************************** > ***************** > -echo Build BIOS Rom for BXT platforms. > -echo. > -echo Usage: BuildBios.bat [options] ^ ^ > -echo. > -echo. /? Display this help text > -echo /l Log a copy of the build output to EDK2.log > -echo /c CleanAll before building > -echo /x64 Set Arch to X64 (default) > -echo /ia32 Set Arch to IA32 > -echo /vs08 Set compiler to VisualStudio 2008 > -echo /vs10 Set compiler to VisualStudio 2010 > -echo /vs12 Set compiler to VisualStudio 2012 > -echo /vs13 Set compiler to VisualStudio 2013 (default) > -echo /vs15 Set compiler to VisualStudio 2015 > -echo Platform Types: %Minnow_RVP% > -echo Build Targets: Debug, Release > -echo. > -echo > ********************************************************** > ***************** > -:ExitFail > -echo. > -set exitCode=3D1 > -goto Exit > - > -:BldFail > -set exitCode=3D1 > -echo -- Error: EDKII BIOS Build has failed! > -echo See EDK2.log for more details > - > -:Exit > -echo %date% %time% > -( > - EndLocal > - set BiosVersion=3D%BiosVersion% > - exit /b %ExitCode% > -) > diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh > b/Platform/BroxtonPlatformPkg/BuildBios.sh > deleted file mode 100644 > index b6127e2..0000000 > --- a/Platform/BroxtonPlatformPkg/BuildBios.sh > +++ /dev/null > @@ -1,333 +0,0 @@ > -# > -# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> -# This program and the accompanying materials > -# are licensed and made available under the terms and conditions of the > BSD License > -# which accompanies this distribution. The full text of the license may= be > found at > -# http://opensource.org/licenses/bsd-license.php > -# > -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > BASIS, > -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. > -# > - > - > ##******************************************************** > ************** > -## Function define > - > ##******************************************************** > ************** > -function ErrorExit() { > - echo > - echo "Press any key......" > - read > - exit 0 > -} > - > -echo -e $(date) > - > ##******************************************************** > ************** > -## Initial Setup > - > ##******************************************************** > ************** > - > -Build_Flags=3D > -SV_String=3D_ > -exitCode=3D0 > -Arch=3DX64 > -FabId=3DB > -BoardId=3DMN > - > -## Initialize all the build flags to FALSE > -## depending on the cmd line input, some will be set to TRUE prior to > building > -ENBDT_PF_BUILD=3DFALSE > -TABLET_PF_BUILD=3DFALSE > -BYTI_PF_BUILD=3DFALSE > -CSLE_ENABLE=3DFALSE > -VP_BIOS_ENABLE=3DFALSE > -SV_BIOS_ENABLE=3DFALSE > -PPV_BIOS_ENABLE=3DFALSE > -RVVP_BIOS_ENABLE=3DFALSE > -RVV_BIOS_ENABLE=3DFALSE > -SrcDebug=3DFALSE > - > -## Clean up previous build files. > -if [ -e $(pwd)/EDK2.log ]; then > - rm $(pwd)/EDK2.log > -fi > - > -if [ -e $(pwd)/Unitool.log ]; then > - rm $(pwd)/Unitool.log > -fi > - > -if [ -e $(pwd)/Conf/target.txt ]; then > - rm $(pwd)/Conf/target.txt > -fi > - > -if [ -e $(pwd)/Conf/BiosId.env ]; then > - rm $(pwd)/Conf/BiosId.env > -fi > - > -if [ -e $(pwd)/Conf/build_rule.txt ]; then > - rm $(pwd)/Conf/build_rule.txt > -fi > - > -if [ -e $(pwd)/FlashMap.h ]; then > - rm $(pwd)/FlashMap.h > -fi > - > -## Override tools_def.txt > -#cp $WORKSPACE\BaseTools\Conf\tools_def.template > $WORKSPACE\Conf\tools_def.txt > -#:: Override tools_def.txt > -echo Creating Conf folder and build config files... > -cp $WORKSPACE/BaseTools/Conf/target.template > $WORKSPACE/Conf/target.txt > -cp $WORKSPACE/BaseTools/Conf/tools_def.template > $WORKSPACE/Conf/tools_def.txt > -cp $WORKSPACE/BaseTools/Conf/build_rule.template > $WORKSPACE/Conf/build_rule.txt > - > - > - > - > -TOOL_CHAIN_TAG=3DGCC5 > - > -## Define platform specific environment variables. > -PLATFORM_NAME=3DBroxtonPlatformPkg > -PLATFORM_PACKAGE=3DPlatform/BroxtonPlatformPkg > -EFI_SOURCE=3D$WORKSPACE > -EDK_SOURCE=3D$WORKSPACE > - > - > ##******************************************************** > ************** > -## Parse command line arguments > - > ##******************************************************** > ************** > - > -## Optional arguments > -for (( i=3D1; i<=3D$#; )) > - do > - if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/X64" ]; then > - Arch=3DX64 > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then > - BoardId=3DBG > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then > - FabId=3DB > - shift > - elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/A" ]; then > - FabId=3DA > - shift > - else > - break > - fi > - done > - > -## Required argument(s) > -if [ "$2" =3D=3D "" ]; then > - echo > - echo "Not Enough Arguments Provided" > - echo "Please review the Help screen" > - ErrorExit > -fi > - > -## Remove the values for Platform_Type and Build_Target from BiosId.env > and stage in Conf/ > -cp $WORKSPACE/$PLATFORM_PACKAGE/BiosId.env > $WORKSPACE/Conf/BiosId.env > -sed -i '/^BOARD_ID/d' $WORKSPACE/Conf/BiosId.env > -sed -i '/^BOARD_REV/d' $WORKSPACE/Conf/BiosId.env > -sed -i '/^BUILD_TYPE/d' $WORKSPACE/Conf/BiosId.env > - > -if [ $BoardId =3D=3D "MN" ]; then > - BOARD_ID=3DMNW3 > - echo BOARD_ID =3D MINNOW3 >> $WORKSPACE/Conf/BiosId.env > -else > - BOARD_ID=3DBEN1 > - echo BOARD_ID =3D BENSONV >> $WORKSPACE/Conf/BiosId.env > -fi > -ENBDT_PF_BUILD=3DTRUE > -PLATFORM_NAME=3DBroxtonPlatformPkg > -PLATFORM_PACKAGE=3DPlatform/BroxtonPlatformPkg > -Platform_Type=3D$1 > - > -## Create new DefineAtBuildMacros.dsc file > - > Build_Macros=3D$WORKSPACE/$PLATFORM_PACKAGE/DefineAtBuildMacros. > dsc > -if [ -f "$Build_Macros" ]; then > - rm $Build_Macros > -fi > -touch $Build_Macros > - > -## Output platform specific build macros to DefineAtBuildMacros.dsc > -echo DEFINE ENBDT_PF_BUILD =3D $ENBDT_PF_BUILD >> $Build_Macros > -echo DEFINE TABLET_PF_BUILD =3D $TABLET_PF_BUILD >> $Build_Macros > -echo DEFINE BYTI_PF_BUILD =3D $BYTI_PF_BUILD >> $Build_Macros > -echo DEFINE CSLE_ENABLE =3D $CSLE_ENABLE >> $Build_Macros > -echo DEFINE VP_BIOS_ENABLE =3D $VP_BIOS_ENABLE >> $Build_Macros > -echo DEFINE SV_BIOS_ENABLE =3D $SV_BIOS_ENABLE >> $Build_Macros > -echo DEFINE PPV_BIOS_ENABLE =3D $PPV_BIOS_ENABLE >> $Build_Macros > -echo DEFINE RVVP_BIOS_ENABLE =3D $RVVP_BIOS_ENABLE >> > $Build_Macros > -echo DEFINE RVV_BIOS_ENABLE =3D $RVV_BIOS_ENABLE >> $Build_Macros > - > -if [ $Arch =3D=3D "IA32" ]; then > - echo DEFINE X64_CONFIG =3D FALSE >> $Build_Macros > -else > - echo DEFINE X64_CONFIG =3D TRUE >> $Build_Macros > -fi > - > -if [ "$(echo $2 | tr 'a-z' 'A-Z')" =3D=3D "RELEASE" ]; then > - TARGET=3DRELEASE > - BUILD_TYPE=3DR > - echo BUILD_TYPE =3D R >> $WORKSPACE/Conf/BiosId.env > -else > - TARGET=3DDEBUG > - BUILD_TYPE=3DD > - echo BUILD_TYPE =3D D >> $WORKSPACE/Conf/BiosId.env > -fi > - > -if [ $BoardId =3D=3D "BG" ]; then > - BOARD_REV=3DA > - echo BOARD_REV =3D A >> $WORKSPACE/Conf/BiosId.env > -fi > - > -if [ $BoardId =3D=3D "MN" ]; then > - if [ $FabId =3D=3D "B" ]; then > - BOARD_REV=3DB > - echo BOARD_REV =3D B >> $WORKSPACE/Conf/BiosId.env > - else > - BOARD_REV=3DA > - echo BOARD_REV =3D A >> $WORKSPACE/Conf/BiosId.env > - fi > -fi > - > - > - > ##******************************************************** > ************** > -## Additional EDK Build Setup/Configuration > - > ##******************************************************** > ************** > -echo "Ensuring correct build directory is present for GenBiosId..." > -ACTIVE_PLATFORM=3D$PLATFORM_PACKAGE/PlatformPkgX64Gcc.dsc > -#TOOL_CHAIN_TAG=3DGCC47 > -MAX_CONCURRENT_THREAD_NUMBER=3D1 > -sed -i '/^ACTIVE_PLATFORM/d' $WORKSPACE/Conf/target.txt > -sed -i '/^TARGET /d' $WORKSPACE/Conf/target.txt > -sed -i '/^TARGET_ARCH/d' $WORKSPACE/Conf/target.txt > -sed -i '/^TOOL_CHAIN_TAG/d' $WORKSPACE/Conf/target.txt > -sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d' > $WORKSPACE/Conf/target.txt > -echo ACTIVE_PLATFORM =3D $ACTIVE_PLATFORM >> > Conf/target.txt > -echo TARGET =3D $TARGET >> C= onf/target.txt > -echo TOOL_CHAIN_TAG =3D $TOOL_CHAIN_TAG >> > Conf/target.txt > -echo MAX_CONCURRENT_THREAD_NUMBER =3D > $MAX_CONCURRENT_THREAD_NUMBER >> Conf/target.txt > -if [ $Arch =3D=3D "IA32" ]; then > - echo TARGET_ARCH =3D IA32 >> C= onf/target.txt > -else > - echo TARGET_ARCH =3D IA32 X64 >> C= onf/target.txt > -fi > - > -### > -### Update ASL path for GCC47 & 46 > -### > - > -## Fix error due to '\' in OBJCOPY_ADDDEBUGFLAG GCC Common rule > - echo DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG =3D --add-gnu- > debuglink=3D\$\(DEBUG_DIR\)/\$\(MODULE_NAME\).debug >> > $WORKSPACE/Conf/tools_def.txt > -### > - > - > ##******************************************************** > ************** > -## Build BIOS > - > ##******************************************************** > ************** > -echo "Creating BiosId..." > -BUILD_PATH=3DBuild/$PLATFORM_NAME/"$TARGET"_"$TOOL_CHAIN_TAG" > -if [ ! -d "$BUILD_PATH/$Arch" ]; then > - mkdir -p $BUILD_PATH/$Arch > -fi > -if [ -e "$BUILD_PATH/$Arch/BiosId.bin" ]; then > - rm -f $BUILD_PATH/$Arch/BiosId.bin > -fi > -./Platform/BroxtonPlatformPkg/Common/Tools/GenBiosId/GenBiosId -i > Conf/BiosId.env -o $BUILD_PATH/$Arch/BiosId.bin > - > - > - > -echo > -echo "**** Replace DebugLib.h to save space.... ****" > -cp PlatformTools/GCC/DebugLib.h Core/MdePkg/Include/Library/ > - > -echo > -echo "**** Copy ResetVector to original folder ****" > -echo "**** Due to nasm can't execute in Ubuntu ****" > - > - > -echo "Invoking EDK2 build..." > - > -build $Build_Flags > - > - > ##******************************************************** > ************** > -## Post Build processing and cleanup > - > ##******************************************************** > ************** > - > -# > -# FSP Rebase and Split > -# > -# 0xFEF7A000 =3D gIntelFsp2WrapperTokenSpaceGuid.PcdFlashFvFspBase =3D > $(CAR_BASE_ADDRESS) + $(BLD_RAM_DATA_SIZE) + > $(FSP_RAM_DATA_SIZE) + $(FSP_EMP_DATA_SIZE) + $(BLD_IBBM_SIZE) > -pushd > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin > -python $WORKSPACE/Core/IntelFsp2Pkg/Tools/SplitFspBin.py rebase -f > Fsp.fd -c m -b 0xFEF7A000 -o ./ -n ApolloLakeFsp.fd > -python $WORKSPACE/Core/IntelFsp2Pkg/Tools/SplitFspBin.py split -f > ApolloLakeFsp.fd -o ./ -n FSP.Fv > -popd > -cp -f > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin/FSP_T.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > -cp -f > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin/FSP_M.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > -cp -f > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin/FSP_S.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - > -echo "Running fce..." > -cat $BUILD_PATH/FV/FVIBBM.Fv $BUILD_PATH/FV/SOC.fd > > $BUILD_PATH/FV/Temp.fd > -# Extract Hii data from build and store a copy in HiiDefaultData.txt > -# UQI 0006 005C 0078 0030 0031 0030 0031 is for question > prompt(STR_IPU_ENABLED) > -# First 0006 is the length of string; Next six byte values are mapped to > STR_IPU_ENABLED string value defined in > Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDx > e/VfrStrings.uni. > -./$PLATFORM_PACKAGE/Common/Tools/FCE/FCE read -i > $BUILD_PATH/FV/Temp.fd 0006 005C 0078 0030 0031 0030 0031 > > $BUILD_PATH/FV/HiiDefaultData.txt > - > -## copy the Setup variable to the SetupDefault variable and save changes= to > BxtXXX.fd > -./$PLATFORM_PACKAGE/Common/Tools/FCE/FCE update -i > $BUILD_PATH/FV/Temp.fd -s $BUILD_PATH/FV/HiiDefaultData.txt -o > $BUILD_PATH/FV/Bxt"$Arch".fd -g B73FE497-B92E-416e-8326-45AD0D270091 > -a 1>>EDK2.log 2>&1 > -#echo "Skip FCE tool..." > -Split -f $BUILD_PATH/FV/Bxt"$Arch".fd -s 0x35000 -o > $BUILD_PATH/FV/FVIBBM.Fv > -#cp $BUILD_PATH/FV/SOC.fd $BUILD_PATH/FV/Bxt"$Arch".fd > - > -## Set the Board_Id, Build_Type, Version_Major, and Version_Minor > environment variables > -##find /v "#" Conf\BiosId.env > ver_strings > -##for /f "tokens=3D1,3" %%i in (ver_strings) do set %%i=3D%%j > -##del /f/q ver_strings >nul > -## > -VERSION_MAJOR=3D$(grep '^VERSION_MAJOR' Conf/BiosId.env | cut -d ' ' -f > 3 | cut -c 1-4) > -VERSION_MINOR=3D$(grep '^VERSION_MINOR' Conf/BiosId.env | cut -d ' ' -f > 3 | cut -c 1-2) > - > BIOS_Name=3D"$BOARD_ID""$BOARD_REV""$SV_String""$Arch"_"$BUILD_TY > PE"_"$VERSION_MAJOR"_"$VERSION_MINOR" > - > -cp -f $BUILD_PATH/FV/FVOBB.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > -cp -f $BUILD_PATH/FV/FVOBBX.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > -cp -f $BUILD_PATH/FV/FVIBBR.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > -cp -f $BUILD_PATH/FV/FVIBBM.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > -cp -f $BUILD_PATH/FV/FVIBBL.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - > -if [ $BoardId =3D=3D "BG" ]; then > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/SpiChunk1.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/SpiChunk2.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/SpiChunk3.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/GCC/NvStorage.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > -fi > - > -if [ $BoardId =3D=3D "MN" ]; then > - if [ $FabId =3D=3D "B" ]; then > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/SpiChunk1.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/SpiChunk2.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/SpiChunk3.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/GCC/NvStorage.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - else > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/SpiChunk1.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/SpiChunk2.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/SpiChunk3.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/GCC/NvStorage.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - fi > -fi > - > -# > -# Assmeble components > -# > -pushd $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > - > -cat FVIBBL.Fv > IBBL.Fv > - > -cat FVIBBM.Fv FSP_M.Fv > IBB.Fv > - > -cat FSP_S.Fv FVIBBR.Fv FVOBB.Fv FVOBBX.Fv > OBB.Fv > - > -cat SpiChunk1.bin IBBL.Fv IBB.Fv SpiChunk2.bin OBB.Fv NvStorage.Fv > SpiChunk3.bin > $BIOS_Name"_GCC".bin > - > -popd > - > -echo > -echo Check if SPI IFWI image is generated at below location: > -echo > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/$BIOS_ > Name"_GCC".bin > -echo > -echo > diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.bat > b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat > new file mode 100644 > index 0000000..7804dc5 > --- /dev/null > +++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.bat > @@ -0,0 +1,612 @@ > +@echo off > +::echo on > +setlocal EnableDelayedExpansion EnableExtensions > +echo. > +echo %date% %time% > +echo. > + > +::******************************************************** > ************** > +:: Initial Setup > +::******************************************************** > ************** > +set WORKSPACE=3D%CD% > +if %WORKSPACE:~-1%=3D=3D\ ( > + set WORKSPACE=3D%WORKSPACE:~0,-1% > +) > +set CORE_PATH=3D%WORKSPACE%\Core > +set PLATFORM_PATH=3DPlatform\BroxtonPlatformPkg > +set SILICON_PATH=3DSilicon\BroxtonSoC > +set > AslPath=3D%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Iasl\iasl.exe > +set > PACKAGES_PATH=3D%CORE_PATH%;%WORKSPACE%\Silicon\;%WORKSPACE% > \Platform;%WORKSPACE%\%PLATFORM_PATH%;%WORKSPACE%\%SILICON > _PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common ; > +set EDK_TOOLS_BIN=3D%WORKSPACE%\BaseTools\Bin\Win32 > +set /a build_threads=3D1 > +set "Nasm_Flags=3D-D ARCH_IA32 -D DEBUG_PORT80" > +set "Build_Flags=3D " > +set exitCode=3D0 > +set Arch=3DX64 > +set Compiler=3DVS2013 > +set FabId=3DB > +set BoardId=3DMN > +if not defined BiosVersion set BiosVersion=3DDEV > + > + > +:: Clean up previous build files. > +echo Clean up old build files... > +if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log > +if exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.l= og > +if exist %WORKSPACE%\Conf\target.txt > del %WORKSPACE%\Conf\target.txt > +if exist %WORKSPACE%\Conf\tools_def.txt > del %WORKSPACE%\Conf\tools_def.txt > +if exist %WORKSPACE%\Conf\build_rule.txt > del %WORKSPACE%\Conf\build_rule.txt > +if exist %WORKSPACE%\Conf\FrameworkDatabase.db > del %WORKSPACE%\Conf\FrameworkDatabase.db > +if exist %WORKSPACE%\Stitch\*.bin del %WORKSPACE%\Stitch\*.= bin > +if exist conf\.cache rmdir /q/s conf\.cache > + > + > +:: Override tools_def.txt > +echo Creating Conf folder and build config files... > +if not exist %WORKSPACE%\Conf md %WORKSPACE%\Conf > +copy > /y %WORKSPACE%\BaseTools\Conf\*.template %WORKSPACE%\Conf\*.txt > + > +:: Setup EDK environment. Edksetup puts new copies of target.txt, > tools_def.txt, build_rule.txt in WorkSpace\Conf > +:: Also run edksetup as soon as possible to avoid it from changing > environment variables we're overriding > +set "VCINSTALLDIR=3D" > +set EDK_TOOLS_PATH=3D%WORKSPACE%\BaseTools > +call edksetup.bat > +@echo off > + > +set Minnow_RVP=3DMINN > + > +:: Initialize all the build flags to FALSE > +:: Then based on the cmd line input, some will be set to TRUE prior to > building. > +:: Note: These variable names match the actual Build Macro names in DSC > for clarity. > +set ENBDT_PF_BUILD=3DFALSE > +set SrcDebug=3DFALSE > +set APLK_SETUP_ENABLE_BUILD=3DFALSE > +set FSP_BUILD=3DFALSE > +set FSP_WRAPPER=3DFALSE > + > +:: Set Defaults of platform specific environment variables. > +set EFI_SOURCE=3D%CD% > +set EDK_SOURCE=3D%CD% > +set PLATFORM_NAME=3DBxtPlatformPkg > +set PLATFORM_PACKAGE=3D%PLATFORM_PATH%\BxtPlatformPkg > +set PLATFORM_RC_PACKAGE=3DSilicon\BroxtonSoC\BroxtonSiPkg > +set > COMMON_PLATFORM_PACKAGE=3D%PLATFORM_PATH%\BxtPlatformPkg > +set FSP_BIN_PKG_NAME=3DBroxtonFspBinPkg > +set > STITCH_PATH=3D%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Stitch > + > +PATH=3D%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Ge > nBiosId;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\nasm\Win32 > +PATH=3D%PATH%;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\FC > E;%WORKSPACE%\%PLATFORM_PATH%\Common\Tools\nasm\Win32 > + > +::******************************************************** > ************** > +:: Parse command line arguments > +::******************************************************** > ************** > + > +:: Optional arguments > +:OptLoop > +if /i "%~1"=3D=3D"" goto Usage > +if /i "%~1"=3D=3D"/?" goto Usage > + > +if /i "%~1"=3D=3D"/l" ( > + set Build_Flags=3D%Build_Flags% -j EDK2.log > + shift > + goto OptLoop > +) > +if /i "%~1" =3D=3D "/c" ( > + echo Removing previous Build files... > + if exist build ( > + del /f/s/q build > nul > + rmdir /s/q build > + ) > + if exist Conf\.cache ( > + del /f/s/q Conf\.cache > nul > + rmdir /s/q Conf\.cache > + ) > + echo. > + shift > + goto OptLoop > +) > + > +if /i "%~1"=3D=3D"/ia32" ( > + set Arch=3DIA32 > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/x64" ( > + set Arch=3DX64 > + shift > + goto OptLoop > +) > + > +if /i "%~1"=3D=3D"/vs08" ( > + set Compiler=3DVS2008 > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/vs10" ( > + set Compiler=3DVS2010 > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/vs12" ( > + set Compiler=3DVS2012 > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/vs13" ( > + set Compiler=3DVS2013 > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/vs15" ( > + set Compiler=3DVS2015 > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/FspW" ( > + set FSP_WRAPPER=3DTRUE > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/A" ( > + set FabId=3DA > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/B" ( > + set FabId=3DB > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/MN" ( > + set BoardId=3DMN > + echo. > + shift > + goto OptLoop > +) > +if /i "%~1"=3D=3D"/BG" ( > + set BoardId=3DBG > + echo. > + shift > + goto OptLoop > +) > + > +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 > +) > + > +echo. & echo -- Setting compiler to %Compiler% -- & echo. > + > +:: BOARD_ID needs to be exactly 7 characters (GenBiosId.exe limitation) > +echo Setting %1 platform configuration and BIOS ID... > +if /i "%~1" =3D=3D "%Minnow_RVP%" ( > + if %BoardId%=3D=3DMN ( > + set BOARD_ID=3DMINNOW3 > + ) else if %BoardId%=3D=3DBG ( > + set BOARD_ID=3DBENSONV > + ) > + set ENBDT_PF_BUILD=3DTRUE > + set PLATFORM_NAME=3DBroxtonPlatformPkg > + set PLATFORM_PACKAGE=3D%PLATFORM_PATH% > + set APLK_SETUP_ENABLE_BUILD=3DTRUE > +) else ( > + echo. & echo Error - Unsupported PlatformType: %1 > + echo Please review the Help screen "/?" & echo. > + goto ExitFail > +) > +set Platform_Type=3D%~1 > + > +:: > +:: Tack on BIOS Version > +:: > + > +::******************************************************** > ************** > +:: Additional EDK Build Setup/Configuration > +::******************************************************** > ************** > + > +::Setup DefineAtBuildMacros config file > +set Build_Macros=3D.\%PLATFORM_PACKAGE%\DefineAtBuildMacros.dsc > +copy /y nul %Build_Macros% >nul > + > +::output platform specific build macros to DefineAtBuildMacros.dsc > +echo DEFINE ENBDT_PF_BUILD > =3D %ENBDT_PF_BUILD% >> %Build_Macros% > + > +echo DEFINE APLK_SETUP_ENABLE_BUILD > =3D %APLK_SETUP_ENABLE_BUILD% >> %Build_Macros% > + > +if "%Arch%"=3D=3D"IA32" ( > + echo DEFINE X64_CONFIG =3D FALSE >>= %Build_Macros% > +) else if "%Arch%"=3D=3D"X64" ( > + echo DEFINE X64_CONFIG =3D TRUE >>= %Build_Macros% > +) > + > +::Stage of copy of BiosId.env in Conf/ with Platform_Type and Build_Targ= et > values removed > + > +if "%Arch%"=3D=3D"X64" ( > + findstr /b /v "BOARD_ID BUILD_TYPE > BOARD_REV" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env > +) else if "%Arch%"=3D=3D"IA32" ( > + findstr /b /v "BOARD_ID BUILD_TYPE BOARD_REV > BOARD_EXT" %PLATFORM_PACKAGE%\BiosId.env > Conf\BiosId.env > + echo BOARD_EXT =3D I32 >> Conf\BiosId.env > +) > + > +if /i "%~2" =3D=3D "RELEASE" ( > + set target=3DRELEASE > + echo BUILD_TYPE =3D R >> Conf\BiosId.env > +) else ( > + set target=3DDEBUG > + echo BUILD_TYPE =3D D >> Conf\BiosId.env > +) > + > +if %BoardId%=3D=3DBG ( > + echo BOARD_REV =3D A >> Conf\BiosId.env > +) > + > +if %BoardId%=3D=3DMN ( > + if %FabId%=3D=3DB ( > + echo BOARD_REV =3D B >> Conf\BiosId.env > + ) else ( > + echo BOARD_REV =3D A >> Conf\BiosId.env > + ) > +) > + > +:: Set the Build_Type, Version_Major, and Version_Minor environment > variables > +find /v "#" Conf\BiosId.env > ver_strings > +for /f "tokens=3D1,3" %%i in (ver_strings) do set %%i=3D%%j > +del /f/q ver_strings >nul > +:: Do this after parsing "ver_strings" > +echo BOARD_ID =3D %BOARD_ID% >> Conf\BiosId.env > + > +echo. > +echo Setting the Build environment for Visual Studio... > +if "%Compiler%"=3D=3D"VS2008" ( > + if defined VS90COMNTOOLS ( > + call "%VS90COMNTOOLS%\vsvars32.bat" >nul > + if /I "%VS90COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual S= tudio > 9.0\Common7\Tools\" ( > + set TOOL_CHAIN_TAG=3DVS2008 > + ) else set TOOL_CHAIN_TAG=3DVS2008x86 > + ) else ( > + echo --ERROR: VS2008 not installed correctly. VS90COMNTOOLS not > defined ^^! > + goto BldFail > + ) > +) else if "%Compiler%"=3D=3D"VS2010" ( > + if defined VS100COMNTOOLS ( > + call "%VS100COMNTOOLS%\vsvars32.bat" >nul > + if /I "%VS100COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual > Studio 10.0\Common7\Tools\" ( > + set TOOL_CHAIN_TAG=3DVS2010 > + ) else set TOOL_CHAIN_TAG=3DVS2010x86 > + ) else ( > + echo --ERROR: VS2010 not installed correctly. VS100COMNTOOLS not > defined ^^! > + goto BldFail > + ) > +) else if "%Compiler%"=3D=3D"VS2012" ( > + if defined VS110COMNTOOLS ( > + call "%VS110COMNTOOLS%\vsvars32.bat" >nul > + if /I "%VS110COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual > Studio 11.0\Common7\Tools\" ( > + set TOOL_CHAIN_TAG=3DVS2012 > + ) else set TOOL_CHAIN_TAG=3DVS2012x86 > + ) else ( > + echo --ERROR: VS2012 not installed correctly. VS110COMNTOOLS not > defined ^^! > + goto BldFail > + ) > +) else if "%Compiler%"=3D=3D"VS2013" ( > + if defined VS120COMNTOOLS ( > + call "%VS120COMNTOOLS%\vsvars32.bat" >nul > + if /I "%VS120COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual > Studio 12.0\Common7\Tools\" ( > + set TOOL_CHAIN_TAG=3DVS2013 > + ) else set TOOL_CHAIN_TAG=3DVS2013x86 > + ) else ( > + echo --ERROR: VS2013 not installed correctly. VS120COMNTOOLS not > defined ^^! > + echo See help ^(/?^) for how specify a different VS versi= on. > + goto BldFail > + ) > +) else if "%Compiler%"=3D=3D"VS2015" ( > + if defined VS140COMNTOOLS ( > + call "%VS140COMNTOOLS%\vsvars32.bat" >nul > + if /I "%VS140COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual > Studio 14.0\Common7\Tools\" ( > + set TOOL_CHAIN_TAG=3DVS2015 > + ) else set TOOL_CHAIN_TAG=3DVS2015x86 > + > + ) else ( > + echo --ERROR: VS2015 not installed correctly. VS140COMNTOOLS not > defined ^^! > + echo See help ^(/?^) for how specify a different VS versi= on. > + goto BldFail > + ) > +) > + > +::******************************************************** > ************** > +:: Build BIOS > +::******************************************************** > ************** > + > +echo Setup build directory for GenBiosId... > +set > BUILD_PATH=3DBuild\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG% > +if not exist %BUILD_PATH%\IA32 mkdir %BUILD_PATH%\IA32 > + > +echo Creating BiosId... > +GenBiosId.exe -i Conf\BiosId.env -o %BUILD_PATH%\IA32\BiosId.bin -ob > Conf\BiosId.bat > +if "%Arch%"=3D=3D"X64" ( > + if not exist %BUILD_PATH%\X64 mkdir %BUILD_PATH%\X64 > + GenBiosId.exe -i Conf\BiosId.env -o %BUILD_PATH%\X64\BiosId.bin -ob > Conf\BiosId.bat > +) else if "%Arch%"=3D=3D"IA32" ( > + if not exist %BUILD_PATH%\IA32 mkdir %BUILD_PATH%\IA32 > + GenBiosId.exe -i Conf\BiosId.env -o %BUILD_PATH%\IA32\BiosId.bin -ob > Conf\BiosId.bat > +) > + > +if ErrorLevel 1 goto BldFail > + > +echo Building ResetVector... > + > +set > ResetVectorPath=3D%WORKSPACE%\%PLATFORM_RC_PACKAGE%\Cpu\Reset > Vector > + > +pushd %ResetVectorPath%\Vtf0 > + nasm.exe %Nasm_Flags% -o Bin\ResetVector.ia32.port80.raw > ResetVectorCode.asm > + > python %CORE_PATH%\UefiCpuPkg\ResetVector\Vtf0\Tools\FixupForRawS > ection.py Bin\ResetVector.ia32.port80.raw > +popd > + > +pushd %ResetVectorPath%\Vtf1 > + nasm.exe %Nasm_Flags% -o Bin\ResetVector.ia32.port80.raw > ResetVectorCode.asm > + > python %CORE_PATH%\UefiCpuPkg\ResetVector\Vtf0\Tools\FixupForRawS > ection.py Bin\ResetVector.ia32.port80.raw > +popd > + > +:: SaveWorkSpace w/a is needed when using subst for Workspace builds (eg= . > R:/) > +set SaveWorkSpace=3D%WORKSPACE% > +set WORKSPACE=3D%CD% > +if "%Arch%"=3D=3D"X64" ( > +set ActivePlatform=3D%PLATFORM_PACKAGE%\PlatformPkgX64.dsc > +) else if "%Arch%"=3D=3D"IA32" ( > +set ActivePlatform=3D%PLATFORM_PACKAGE%\PlatformPkgIA32.dsc > +) > + > +echo Modifying Conf files for this build... > +:: Remove lines with these tags from target.txt > +findstr /V "TARGET TARGET_ARCH TOOL_CHAIN_TAG ACTIVE_PLATFORM > MAX_CONCURRENT_THREAD_NUMBER" Conf\target.txt > > Conf\target.txt.tmp > + > +if "%Arch%"=3D=3D"IA32" ( > + echo TARGET_ARCH =3D IA32 >> Conf\t= arget.txt.tmp > +) else if "%Arch%"=3D=3D"X64" ( > + echo TARGET_ARCH =3D IA32 X64 >> Conf\t= arget.txt.tmp > +) > +echo TARGET =3D %TARGET% >> Conf\t= arget.txt.tmp > +echo TOOL_CHAIN_TAG =3D %TOOL_CHAIN_TAG% >> > Conf\target.txt.tmp > +echo ACTIVE_PLATFORM =3D %ActivePlatform% >> > Conf\target.txt.tmp > +echo MAX_CONCURRENT_THREAD_NUMBER =3D %build_threads% >> > Conf\target.txt.tmp > + > +move /Y Conf\target.txt.tmp Conf\target.txt >nul > +echo *_VS2008x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > +echo *_VS2010x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > +echo *_VS2012x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > +echo *_VS2013x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > +echo *_VS2015x86_*_ASL_PATH =3D %AslPath% >> Conf\tools_def.txt > + > +echo. > +echo Invoking normal EDK2 build... > +build %Build_Flags% > +if ErrorLevel 1 goto BldFail > + > +set WORKSPACE=3D%SaveWorkSpace% > + > +::******************************************************** > ************** > +:: Post Build processing and cleanup > +::******************************************************** > ************** > +echo Create FlashMap.h... > + > +set PLAT_INIT_PRE_MEM=3DPlatformPreMemPei > + > +set > AutoGenPath=3D%BUILD_PATH%\IA32\BroxtonPlatformPkg\Common\Platfor > mSettings\PlatformPreMemPei\%PLAT_INIT_PRE_MEM%\DEBUG\AutoGen > .h > + > +if not exist "%AutoGenPath%" ( > + echo ERROR: Couldn't find %AutoGenPath% so we can generate > FlashMap.h > + goto BldFail > +) > +findstr /L > "_PCD_VALUE_" %AutoGenPath% > %STITCH_PATH%\FlashMap.h > + > +echo Running FCE... > +copy /b %BUILD_PATH%\FV\FvIBBM.fv + /b %BUILD_PATH%\FV\Soc.fd > /b %BUILD_PATH%\FV\Temp.fd > +:: Extract Hii data from build and store a copy in HiiDefaultData.txt > +:: UQI 0006 005C 0078 0030 0031 0030 0031 is for question > prompt(STR_IPU_ENABLED) > +:: First 0006 is the length of string; Next six byte values are mapped t= o > STR_IPU_ENABLED string value defined in > Platform\BroxtonPlatformPkg\Common\PlatformSettings\PlatformSetupDx > e\VfrStrings.uni. > +fce.exe read -i %BUILD_PATH%\FV\Temp.fd 0006 005C 0078 0030 0031 0030 > 0031 > %BUILD_PATH%\FV\HiiDefaultData.txt 2>>EDK2.log > +:: Generate the Setup variable and save changes to BxtXXX.fd > +:: B73FE497-B92E-416e-8326-45AD0D270091 is the GUID of IBBM FV > +fce.exe update -i %BUILD_PATH%\FV\Temp.fd - > s %BUILD_PATH%\FV\HiiDefaultData.txt - > o %BUILD_PATH%\FV\Bxt%Arch%.fd -g B73FE497-B92E-416e-8326- > 45AD0D270091 -a 1>>EDK2.log 2>&1 > +split -f %BUILD_PATH%\FV\Bxt%Arch%.fd -s 0x35000 - > o %BUILD_PATH%\FV\FvIBBM.fv > + > +if ErrorLevel 1 goto BldFail > + > +@echo off > + > +:: Translate Release Build Type > +if "%BUILD_TYPE%"=3D=3D"R" set BUILD_TYPE=3DR > + > +echo Copy BIOS... > +set > BIOS_Name=3D%BOARD_ID%%BOARD_REV%_%Arch%_%BUILD_TYPE%_%VE > RSION_MAJOR%_%VERSION_MINOR% > +copy > /y/b %BUILD_PATH%\FV\Soc.fd %STITCH_PATH%\%BIOS_Name%.ROM > >nul > +copy > /y %STITCH_PATH%\FlashMap.h %STITCH_PATH%\%BIOS_Name%.map > >nul > + > +set Storage_Folder=3D%STITCH_PATH%\%BIOS_Name% > +if not exist %Storage_Folder% mkdir %Storage_Folder% > + > +copy /y/b %BUILD_PATH%\FV\FvIBBL.fv %Storage_Folder% >nul > +copy /y/b %BUILD_PATH%\FV\FvIBBM.fv %Storage_Folder% >nul > +copy /y/b %BUILD_PATH%\FV\FvIBBR.fv %Storage_Folder% >nul > +copy /y/b %BUILD_PATH%\FV\FvOBB.fv %Storage_Folder% >nul > +copy /y/b %BUILD_PATH%\FV\FvOBBX.fv %Storage_Folder% >nul > +copy /y/b %BUILD_PATH%\FV\FvOBBY.fv %Storage_Folder% >nul > + > +if /i "%FSP_WRAPPER%" =3D=3D "TRUE" ( > +:: 0xFEF7A000 =3D gIntelFsp2WrapperTokenSpaceGuid.PcdFlashFvFspBase =3D > $(CAR_BASE_ADDRESS) + $(BLD_RAM_DATA_SIZE) + > $(FSP_RAM_DATA_SIZE) + $(FSP_EMP_DATA_SIZE) + $(BLD_IBBM_SIZE) > + > pushd %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBi > nPkg\FspBin > + python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py rebase - > f Fsp.fd -c m -b 0xFEF7A000 -o .\ -n ApolloLakeFsp.fd > + python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py split -f > ApolloLakeFsp.fd -o .\ -n FSP.Fv > + popd > + copy > /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBin > Pkg\FspBin\FSP_T.Fv %Storage_Folder%\FSP_T.Fv > + copy > /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBin > Pkg\FspBin\FSP_M.Fv %Storage_Folder%\FSP_M.Fv > + copy > /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBin > Pkg\FspBin\FSP_S.Fv %Storage_Folder%\FSP_S.Fv > +) > + > +echo Get NvStorage Base and Size... > +if not exist "%STITCH_PATH%\FlashMap.h" ( > + echo ERROR: Couldn't find %STITCH_PATH%\FlashMap.h > + goto BldFail > +) > + > +::generate NvStorage.Fv > +:: %STITCH_PATH%\FlashMap.h has the information for the magic > numbers below. Parse it. > +:: You'll need to account for both hex (0x000000) and int (123456= 7U) > value types > +:: FLASH_REGION_VPD_OFFSET > +:: _PCD_VALUE_PcdFlashNvStorageBase - > _PCD_VALUE_PcdFlashBaseAddress > +:: FLASH_REGION_VPD_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE > +:: _PCD_VALUE_PcdFlashNvStorageSize > +:: > +:: PCD to find Variable Fi= le to search > +::=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= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + call :FindPcdInFile _PCD_VALUE_PcdFlashNvStorageBase NvStorageBase > "%STITCH_PATH%\FlashMap.h" > + call :FindPcdInFile _PCD_VALUE_PcdFlashBaseAddress BaseAddress > "%STITCH_PATH%\FlashMap.h" > + call :FindPcdInFile _PCD_VALUE_PcdFlashNvStorageSize NvStorageSize > "%STITCH_PATH%\FlashMap.h" > +:: Find image offset as opposed to memory offset > + PowerShell ($env:NvStorageBase - $env:BaseAddress) > temp.pcd > + set /p VpdOffset=3D + del /f /q temp.pcd > +:: Force the variables we care about into DEC string format > + set VpdSize=3D%NvStorageSize% > + call :ForceToDec VpdOffset > + call :ForceToDec VpdSize > +:: Dump what we found > + echo - NvStorageBase =3D %NvStorageBase% > + echo - BaseAddress =3D %BaseAddress% > + echo - NvStorageSize =3D %NvStorageSize% > + echo - VpdOffset =3D %VpdOffset% > + echo - VpdSize =3D %VpdSize% > + > +:: Create NvStorage.fv > + echo Create NvStorage.fv... > + pushd %STITCH_PATH% > + REM This -s offset must equal the decimal value of > FLASH_REGION_VPD_OFFSET in the Platform.fdf > + Split.exe -f %STITCH_PATH%\%BIOS_Name%.ROM -s %VpdOffset% -o > temp1.bin -t temp2.bin > + REM This -s offset must equal the decimal value of > + REM FLASH_REGION_VPD_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_WORKING_SIZE + > FLASH_REGION_NVSTORAGE_SUBREGION_NV_FTW_SPARE_SIZE > + Split.exe -f temp2.bin -s %VpdSize% -o %Storage_Folder%\NvStorage.Fv > -t temp3.bin > + del /F/Q temp1.bin temp2.bin temp3.bin > + popd > + > +echo. > +echo Build location: %BUILD_PATH% > +echo BIOS ROM Created: %BIOS_Name% > +echo. > +echo --------------- The EDKII BIOS build has successfully completed. --= -------- > ----- > +echo. > +goto Exit > + > +:: > +:: Find PCD value (%~1) in a file (%~3) and return it in a variable (%~2= ) as a > HEX string > +:: > +:: USAGE: call :FindPcdInFile PCD Variable File > +:FindPcdInFile > + call :GetPcd "%~1" "%~2" "%~3" > + call :ForceToHex "%~2" > +goto :EOF > + > +:: > +:: Find PCD value (%~1) in a file (%~3) and return it in a variable (%~2= ) > +:: > +:: USAGE: call :GetPcd PCD Variable File > +:GetPcd > + set _TargetFile=3D%~3 > + if not exist "%_TargetFile%" ( > + echo ERROR: Couldn't find %_TargetFile%^! > + set ExitCode=3D1 > + ) else ( > + for /f "tokens=3D3" %%a in ('findstr /C:"%~1" "%_TargetFile%"') do ( > + set _TestValue=3D%%~a > + set _PcdValue=3D!_TestValue:~0,-1! > + ) > + set %~2=3D!_PcdValue! > + echo %2 %_PcdValue% > + ) > + set _TargetFile=3D > + set _TestValue=3D > + set _PcdValue=3D > +goto :EOF > + > +:: > +:: Force value of %1 into hex format 0x1234 > +:: > +:: USAGE: call :ForceToHex Variable > +:ForceToHex > + call set _Temp=3D%%%~1%% > + if "%_Temp:~0,2%" =3D=3D "0x" goto :ForceToHexExit > + PowerShell ('0x' + [convert]::tostring($env:_Temp, 16).ToUpper()) > > temp.pcd > + set /p %~1=3D + del /f /q temp.pcd > +:ForceToHexExit > + set _Temp=3D > +goto :EOF > + > +:: > +:: Force value of %1 into decimal format > +:: > +:: USAGE: call :ForceToDec Variable > +:ForceToDec > + call set _Temp=3D%%%~1%% > + if not "%_Temp:~0,2%" =3D=3D "0x" goto :ForceToDecExit > + PowerShell ([convert]::toInt64((Get-Item env:_Temp).value, 16)) > > temp.pcd > + set /p %~1=3D + del /f /q temp.pcd > +:ForceToDecExit > + set _Temp=3D > +goto :EOF > + > +:Usage > +echo. > +echo > ********************************************************** > ***************** > +echo Build Edk II BIOS Rom for BXT platforms. > +echo. > +echo Usage: %0 [options] ^ ^ > +echo. > +echo. /? Display this help text > +echo /l Log a copy of the build output to EDK2.log > +echo /c CleanAll before building > +echo /x64 Set Arch to X64 (default) > +echo /ia32 Set Arch to IA32 > +echo /vs08 Set compiler to VisualStudio 2008 > +echo /vs10 Set compiler to VisualStudio 2010 > +echo /vs12 Set compiler to VisualStudio 2012 > +echo /vs13 Set compiler to VisualStudio 2013 (default) > +echo /vs15 Set compiler to VisualStudio 2015 > +echo Platform Types: %Minnow_RVP% > +echo Build Targets: Debug, Release > +echo. > +echo > ********************************************************** > ***************** > +:ExitFail > +echo. > +set exitCode=3D1 > +goto Exit > + > +:BldFail > +set exitCode=3D1 > +echo -- Error: EDKII BIOS Build has failed! > +echo See EDK2.log for more details > + > +:Exit > +echo %date% %time% > +( > + EndLocal > + set BiosVersion=3D%BiosVersion% > + exit /b %ExitCode% > +) > diff --git a/Platform/BroxtonPlatformPkg/BuildBxtBios.sh > b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh > new file mode 100644 > index 0000000..d0b677f > --- /dev/null > +++ b/Platform/BroxtonPlatformPkg/BuildBxtBios.sh > @@ -0,0 +1,333 @@ > +# > +# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> +# This program and the accompanying materials > +# are licensed and made available under the terms and conditions of the > BSD License > +# which accompanies this distribution. The full text of the license may= be > found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. > +# > + > +##******************************************************* > *************** > +## Function define > +##******************************************************* > *************** > +function ErrorExit() { > + echo > + echo "Press any key......" > + read > + exit 0 > +} > + > +echo -e $(date) > +##******************************************************* > *************** > +## Initial Setup > +##******************************************************* > *************** > + > +Build_Flags=3D > +SV_String=3D_ > +exitCode=3D0 > +Arch=3DX64 > +FabId=3DB > +BoardId=3DMN > + > +## Initialize all the build flags to FALSE > +## depending on the cmd line input, some will be set to TRUE prior to > building > +ENBDT_PF_BUILD=3DFALSE > +TABLET_PF_BUILD=3DFALSE > +BYTI_PF_BUILD=3DFALSE > +CSLE_ENABLE=3DFALSE > +VP_BIOS_ENABLE=3DFALSE > +SV_BIOS_ENABLE=3DFALSE > +PPV_BIOS_ENABLE=3DFALSE > +RVVP_BIOS_ENABLE=3DFALSE > +RVV_BIOS_ENABLE=3DFALSE > +SrcDebug=3DFALSE > + > +## Clean up previous build files. > +if [ -e $(pwd)/EDK2.log ]; then > + rm $(pwd)/EDK2.log > +fi > + > +if [ -e $(pwd)/Unitool.log ]; then > + rm $(pwd)/Unitool.log > +fi > + > +if [ -e $(pwd)/Conf/target.txt ]; then > + rm $(pwd)/Conf/target.txt > +fi > + > +if [ -e $(pwd)/Conf/BiosId.env ]; then > + rm $(pwd)/Conf/BiosId.env > +fi > + > +if [ -e $(pwd)/Conf/build_rule.txt ]; then > + rm $(pwd)/Conf/build_rule.txt > +fi > + > +if [ -e $(pwd)/FlashMap.h ]; then > + rm $(pwd)/FlashMap.h > +fi > + > +## Override tools_def.txt > +#cp $WORKSPACE\BaseTools\Conf\tools_def.template > $WORKSPACE\Conf\tools_def.txt > +#:: Override tools_def.txt > +echo Creating Conf folder and build config files... > +cp $WORKSPACE/BaseTools/Conf/target.template > $WORKSPACE/Conf/target.txt > +cp $WORKSPACE/BaseTools/Conf/tools_def.template > $WORKSPACE/Conf/tools_def.txt > +cp $WORKSPACE/BaseTools/Conf/build_rule.template > $WORKSPACE/Conf/build_rule.txt > + > + > + > + > +TOOL_CHAIN_TAG=3DGCC5 > + > +## Define platform specific environment variables. > +PLATFORM_NAME=3DBroxtonPlatformPkg > +PLATFORM_PACKAGE=3DPlatform/BroxtonPlatformPkg > +EFI_SOURCE=3D$WORKSPACE > +EDK_SOURCE=3D$WORKSPACE > + > +##******************************************************* > *************** > +## Parse command line arguments > +##******************************************************* > *************** > + > +## Optional arguments > +for (( i=3D1; i<=3D$#; )) > + do > + if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/X64" ]; then > + Arch=3DX64 > + shift > + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/MN" ]; then > + BoardId=3DMN > + shift > + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then > + BoardId=3DBG > + shift > + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then > + FabId=3DB > + shift > + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/A" ]; then > + FabId=3DA > + shift > + else > + break > + fi > + done > + > +## Required argument(s) > +if [ "$2" =3D=3D "" ]; then > + echo > + echo "Not Enough Arguments Provided" > + echo "Please review the Help screen" > + ErrorExit > +fi > + > +## Remove the values for Platform_Type and Build_Target from BiosId.env > and stage in Conf/ > +cp $WORKSPACE/$PLATFORM_PACKAGE/BiosId.env > $WORKSPACE/Conf/BiosId.env > +sed -i '/^BOARD_ID/d' $WORKSPACE/Conf/BiosId.env > +sed -i '/^BOARD_REV/d' $WORKSPACE/Conf/BiosId.env > +sed -i '/^BUILD_TYPE/d' $WORKSPACE/Conf/BiosId.env > + > +if [ $BoardId =3D=3D "MN" ]; then > + BOARD_ID=3DMNW3 > + echo BOARD_ID =3D MINNOW3 >> $WORKSPACE/Conf/BiosId.env > +else > + BOARD_ID=3DBEN1 > + echo BOARD_ID =3D BENSONV >> $WORKSPACE/Conf/BiosId.env > +fi > +ENBDT_PF_BUILD=3DTRUE > +PLATFORM_NAME=3DBroxtonPlatformPkg > +PLATFORM_PACKAGE=3DPlatform/BroxtonPlatformPkg > +Platform_Type=3D$1 > + > +## Create new DefineAtBuildMacros.dsc file > +Build_Macros=3D$WORKSPACE/$PLATFORM_PACKAGE/DefineAtBuildMacros > .dsc > +if [ -f "$Build_Macros" ]; then > + rm $Build_Macros > +fi > +touch $Build_Macros > + > +## Output platform specific build macros to DefineAtBuildMacros.dsc > +echo DEFINE ENBDT_PF_BUILD =3D $ENBDT_PF_BUILD >> $Build_Macros > +echo DEFINE TABLET_PF_BUILD =3D $TABLET_PF_BUILD >> $Build_Macros > +echo DEFINE BYTI_PF_BUILD =3D $BYTI_PF_BUILD >> $Build_Macros > +echo DEFINE CSLE_ENABLE =3D $CSLE_ENABLE >> $Build_Macros > +echo DEFINE VP_BIOS_ENABLE =3D $VP_BIOS_ENABLE >> $Build_Macros > +echo DEFINE SV_BIOS_ENABLE =3D $SV_BIOS_ENABLE >> $Build_Macros > +echo DEFINE PPV_BIOS_ENABLE =3D $PPV_BIOS_ENABLE >> $Build_Macros > +echo DEFINE RVVP_BIOS_ENABLE =3D $RVVP_BIOS_ENABLE >> > $Build_Macros > +echo DEFINE RVV_BIOS_ENABLE =3D $RVV_BIOS_ENABLE >> > $Build_Macros > + > +if [ $Arch =3D=3D "IA32" ]; then > + echo DEFINE X64_CONFIG =3D FALSE >> $Build_Macros > +else > + echo DEFINE X64_CONFIG =3D TRUE >> $Build_Macros > +fi > + > +if [ "$(echo $2 | tr 'a-z' 'A-Z')" =3D=3D "RELEASE" ]; then > + TARGET=3DRELEASE > + BUILD_TYPE=3DR > + echo BUILD_TYPE =3D R >> $WORKSPACE/Conf/BiosId.env > +else > + TARGET=3DDEBUG > + BUILD_TYPE=3DD > + echo BUILD_TYPE =3D D >> $WORKSPACE/Conf/BiosId.env > +fi > + > +if [ $BoardId =3D=3D "BG" ]; then > + BOARD_REV=3DA > + echo BOARD_REV =3D A >> $WORKSPACE/Conf/BiosId.env > +fi > + > +if [ $BoardId =3D=3D "MN" ]; then > + if [ $FabId =3D=3D "B" ]; then > + BOARD_REV=3DB > + echo BOARD_REV =3D B >> $WORKSPACE/Conf/BiosId.env > + else > + BOARD_REV=3DA > + echo BOARD_REV =3D A >> $WORKSPACE/Conf/BiosId.env > + fi > +fi > + > + > +##******************************************************* > *************** > +## Additional EDK Build Setup/Configuration > +##******************************************************* > *************** > +echo "Ensuring correct build directory is present for GenBiosId..." > +ACTIVE_PLATFORM=3D$PLATFORM_PACKAGE/PlatformPkgX64Gcc.dsc > +#TOOL_CHAIN_TAG=3DGCC47 > +MAX_CONCURRENT_THREAD_NUMBER=3D1 > +sed -i '/^ACTIVE_PLATFORM/d' $WORKSPACE/Conf/target.txt > +sed -i '/^TARGET /d' $WORKSPACE/Conf/target.txt > +sed -i '/^TARGET_ARCH/d' $WORKSPACE/Conf/target.txt > +sed -i '/^TOOL_CHAIN_TAG/d' $WORKSPACE/Conf/target.txt > +sed -i '/^MAX_CONCURRENT_THREAD_NUMBER/d' > $WORKSPACE/Conf/target.txt > +echo ACTIVE_PLATFORM =3D $ACTIVE_PLATFORM >> > Conf/target.txt > +echo TARGET =3D $TARGET >> C= onf/target.txt > +echo TOOL_CHAIN_TAG =3D $TOOL_CHAIN_TAG >> > Conf/target.txt > +echo MAX_CONCURRENT_THREAD_NUMBER =3D > $MAX_CONCURRENT_THREAD_NUMBER >> Conf/target.txt > +if [ $Arch =3D=3D "IA32" ]; then > + echo TARGET_ARCH =3D IA32 >> C= onf/target.txt > +else > + echo TARGET_ARCH =3D IA32 X64 >> C= onf/target.txt > +fi > + > +### > +### Update ASL path for GCC47 & 46 > +### > + > +## Fix error due to '\' in OBJCOPY_ADDDEBUGFLAG GCC Common rule > + echo DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG =3D --add-gnu- > debuglink=3D\$\(DEBUG_DIR\)/\$\(MODULE_NAME\).debug >> > $WORKSPACE/Conf/tools_def.txt > +### > + > +##******************************************************* > *************** > +## Build BIOS > +##******************************************************* > *************** > +echo "Creating BiosId..." > +BUILD_PATH=3DBuild/$PLATFORM_NAME/"$TARGET"_"$TOOL_CHAIN_TAG" > +if [ ! -d "$BUILD_PATH/$Arch" ]; then > + mkdir -p $BUILD_PATH/$Arch > +fi > +if [ -e "$BUILD_PATH/$Arch/BiosId.bin" ]; then > + rm -f $BUILD_PATH/$Arch/BiosId.bin > +fi > +./Platform/BroxtonPlatformPkg/Common/Tools/GenBiosId/GenBiosId -i > Conf/BiosId.env -o $BUILD_PATH/$Arch/BiosId.bin > + > + > +echo > +echo "**** Copy ResetVector to original folder ****" > +echo "**** Due to nasm can't execute in Ubuntu ****" > + > + > +echo "Invoking EDK2 build..." > + > +build $Build_Flags > + > +echo "check if Build was successful" > + > +##******************************************************* > *************** > +## Post Build processing and cleanup > +##******************************************************* > *************** > + > +# > +# FSP Rebase and Split > +# > +# 0xFEF7A000 =3D gIntelFsp2WrapperTokenSpaceGuid.PcdFlashFvFspBase =3D > $(CAR_BASE_ADDRESS) + $(BLD_RAM_DATA_SIZE) + > $(FSP_RAM_DATA_SIZE) + $(FSP_EMP_DATA_SIZE) + $(BLD_IBBM_SIZE) > +pushd > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin > +python $WORKSPACE/Core/IntelFsp2Pkg/Tools/SplitFspBin.py rebase -f > Fsp.fd -c m -b 0xFEF7A000 -o ./ -n ApolloLakeFsp.fd > +python $WORKSPACE/Core/IntelFsp2Pkg/Tools/SplitFspBin.py split -f > ApolloLakeFsp.fd -o ./ -n FSP.Fv > +popd > +cp -f > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin/FSP_T.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > +cp -f > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin/FSP_M.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > +cp -f > $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/Fsp > Bin/FSP_S.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + > +echo "Running fce..." > +cat $BUILD_PATH/FV/FVIBBM.Fv $BUILD_PATH/FV/SOC.fd > > $BUILD_PATH/FV/Temp.fd > +# Extract Hii data from build and store a copy in HiiDefaultData.txt > +# UQI 0006 005C 0078 0030 0031 0030 0031 is for question > prompt(STR_IPU_ENABLED) > +# First 0006 is the length of string; Next six byte values are mapped to > STR_IPU_ENABLED string value defined in > Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDx > e/VfrStrings.uni. > +./$PLATFORM_PACKAGE/Common/Tools/FCE/FCE read -i > $BUILD_PATH/FV/Temp.fd 0006 005C 0078 0030 0031 0030 0031 > > $BUILD_PATH/FV/HiiDefaultData.txt > + > +## copy the Setup variable to the SetupDefault variable and save changes > to BxtXXX.fd > +./$PLATFORM_PACKAGE/Common/Tools/FCE/FCE update -i > $BUILD_PATH/FV/Temp.fd -s $BUILD_PATH/FV/HiiDefaultData.txt -o > $BUILD_PATH/FV/Bxt"$Arch".fd -g B73FE497-B92E-416e-8326-45AD0D270091 > -a 1>>EDK2.log 2>&1 > +#echo "Skip FCE tool..." > +Split -f $BUILD_PATH/FV/Bxt"$Arch".fd -s 0x35000 -o > $BUILD_PATH/FV/FVIBBM.Fv > +#cp $BUILD_PATH/FV/SOC.fd $BUILD_PATH/FV/Bxt"$Arch".fd > + > +## Set the Board_Id, Build_Type, Version_Major, and Version_Minor > environment variables > +##find /v "#" Conf\BiosId.env > ver_strings > +##for /f "tokens=3D1,3" %%i in (ver_strings) do set %%i=3D%%j > +##del /f/q ver_strings >nul > +## > +VERSION_MAJOR=3D$(grep '^VERSION_MAJOR' Conf/BiosId.env | cut -d ' ' -f > 3 | cut -c 1-4) > +VERSION_MINOR=3D$(grep '^VERSION_MINOR' Conf/BiosId.env | cut -d ' ' -f > 3 | cut -c 1-2) > +BIOS_Name=3D"$BOARD_ID""$BOARD_REV""$SV_String""$Arch"_"$BUILD_T > YPE"_"$VERSION_MAJOR"_"$VERSION_MINOR" > + > +cp -f $BUILD_PATH/FV/FVOBB.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > +cp -f $BUILD_PATH/FV/FVOBBX.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > +cp -f $BUILD_PATH/FV/FVIBBR.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > +cp -f $BUILD_PATH/FV/FVIBBM.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > +cp -f $BUILD_PATH/FV/FVIBBL.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + > +if [ $BoardId =3D=3D "BG" ]; then > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/SpiChunk1.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/SpiChunk2.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/SpiChunk3.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benso > nGlacier/FAB_A/GCC/NvStorage.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > +fi > + > +if [ $BoardId =3D=3D "MN" ]; then > + if [ $FabId =3D=3D "B" ]; then > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/SpiChunk1.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/SpiChunk2.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/SpiChunk3.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_B/GCC/NvStorage.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + else > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/SpiChunk1.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/SpiChunk2.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/SpiChunk3.bin > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + cp -f > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minno > wBoard3/FAB_A/GCC/NvStorage.Fv > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + fi > +fi > + > +# > +# Assmeble components > +# > +pushd $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch > + > +cat FVIBBL.Fv > IBBL.Fv > + > +cat FVIBBM.Fv FSP_M.Fv > IBB.Fv > + > +cat FSP_S.Fv FVIBBR.Fv FVOBB.Fv FVOBBX.Fv > OBB.Fv > + > +cat SpiChunk1.bin IBBL.Fv IBB.Fv SpiChunk2.bin OBB.Fv NvStorage.Fv > SpiChunk3.bin > $BIOS_Name"_GCC".bin > + > +popd > + > +echo > +echo Check if SPI IFWI image is generated at below location: > +echo > $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/$BIOS_ > Name"_GCC".bin > +echo > +echo > diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat > b/Platform/BroxtonPlatformPkg/BuildIFWI.bat > index 5042580..04d338d 100644 > --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat > +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat > @@ -2,6 +2,7 @@ > SetLocal EnableDelayedExpansion EnableExtensions >=20 > :: Assign initial values > +set thisscript=3D%0 > set exitCode=3D0 > set "Build_Flags=3D " > set Arch=3DX64 > @@ -116,7 +117,7 @@ if /i "%~1"=3D=3D"/m" ( > :: Require 2 input parameters > if "%~2"=3D=3D"" ( > echo. & echo -- ERROR: Not Enough Arguments Provided > - echo -- Please review the Help screen "/?" -- & echo. > + echo -- Please review the Help screen %thisscript% "/?" -- & echo. > goto exit > ) >=20 > @@ -129,8 +130,8 @@ 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 > echo Build_IFWI: Calling BIOS build Script... > echo. >=20 > -echo - call > BuildBios.bat %buildthread% %Build_Flags% %Platform_Type% %Build_Targe > t% > - > call %WORKSPACE%\%PLATFORM_PATH%\BuildBios.bat %buildthread% %Bu > ild_Flags% %Platform_Type% %Build_Target% > +echo - call > BuildBxtBios.bat %buildthread% %Build_Flags% %Platform_Type% %Build_Ta > rget% > +call %WORKSPACE%\%PLATFORM_PATH%\BuildBxtBios.bat %buildthread% > %Build_Flags% %Platform_Type% %Build_Target% > if ErrorLevel 1 ( > echo echo -- Error Building BIOS & echo. > set exitCode=3D1 > @@ -170,7 +171,7 @@ if ErrorLevel 1 ( > ) > echo. > echo Build_IFWI is finished. > -echo The final IFWI file is located in Stitch\ > +echo The final IFWI file is located > in %WORKSPACE%\%PLATFORM_PATH%\Common\Tools\Stitch\ > 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 >=20 >=20 > @@ -180,11 +181,12 @@ goto Exit > if /i "%SkipUsageFlag%" =3D=3D "TRUE" goto Exit > echo Script to build BIOS firmware and stitch the entire IFWI. > echo. > -echo Usage: BuildIFWI.bat [options] ^ ^ > +echo Usage: %thisscript% [options] ^ ^ > echo. > echo. /? Display this help text > echo /l Log a copy of the build output to EDK2.log > echo /c CleanAll before building > +echo /m Set the build thread count to number of processors > echo /FspW Build FSP and FSP Wrapper > echo /x64 Set Arch to X64 (default) > echo /vs08 Set compiler to VisualStudio 2008 > diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh > b/Platform/BroxtonPlatformPkg/BuildIFWI.sh > index 73766cc..f5fb4b4 100755 > --- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh > +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh > @@ -19,10 +19,12 @@ function Usage () { > echo > echo "Usage: BuildIFWI.sh Build_Flags Platform_Type Build_Target" > echo > - echo " Build_Flags: /A Set FabId to A (defau= lt: FAB_B)" > - echo " Build_Flags: /B Set FabId to B (defau= lt: FAB_B)" > - echo " Platform_Type [optional]: Broxton " > - echo " Build_Target: Release, Debug " > + echo " Build_Flags: /MN Minnow3 Board (defaul= t: MN) " > + echo " Build_Flags: /BG Benson Glacier Board = " > + echo " Build_Flags: /A Set FabId to A (defau= lt: FAB_B) " > + echo " Build_Flags: /B Set FabId to B (defau= lt: FAB_B) " > + echo " Platform_Type [optional]: Broxton " > + echo " Build_Target: Release, Debug " > echo > echo "Press any key......" > read > @@ -56,6 +58,10 @@ for (( i=3D1; i<=3D$#; )) > Arch=3DX64 > Build_Flags=3D"$Build_Flags /x64" > shift > + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/MN" ]; then > + BoardId=3DMN > + Build_Flags=3D"$Build_Flags /MN" > + shift > elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then > BoardId=3DBG > Build_Flags=3D"$Build_Flags /BG" > @@ -94,7 +100,7 @@ fi > ## 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" > echo "Build_IFWI: Calling BIOS build Script..." > -bash Platform/BroxtonPlatformPkg/BuildBios.sh $Build_Flags > $Platform_Type $Build_Target > +bash Platform/BroxtonPlatformPkg/BuildBxtBios.sh $Build_Flags > $Platform_Type $Build_Target >=20 > echo > echo Finished Building Process. > -- > 2.7.0.windows.1 >=20