From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: zailiang.sun@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Thu, 09 May 2019 00:55:04 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 00:55:04 -0700 X-ExtLoop1: 1 Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 09 May 2019 00:55:03 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 00:55:03 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 00:55:03 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by shsmsx102.ccr.corp.intel.com ([169.254.2.249]) with mapi id 14.03.0415.000; Thu, 9 May 2019 15:55:01 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Qian, Yi" Subject: Re: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Thread-Topic: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Thread-Index: AQHVBiAVQHJBqroRA0mW9VJaeLkB0aZibL2g Date: Thu, 9 May 2019 07:55:01 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C62EA4@SHSMSX104.ccr.corp.intel.com> References: <20190509043111.15272-1-michael.d.kinney@intel.com> <20190509043111.15272-13-michael.d.kinney@intel.com> In-Reply-To: <20190509043111.15272-13-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zailiang Sun > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, May 9, 2019 12:31 PM > To: devel@edk2.groups.io > Cc: Sun, Zailiang ; Qian, Yi > Subject: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions > from build scripts >=20 > In preparation for moving Vlv2TbltDevicePkg to the edk2-platforms > repository, the batch scripts used to build this platform are updated to = not > make any assumptions about the directory location of Vlv2TbltDevicePkg. >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Signed-off-by: Michael D Kinney > --- > Vlv2TbltDevicePkg/.gitignore | 2 + > Vlv2TbltDevicePkg/Build_IFWI.bat | 31 +++- > Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat | 23 ++- > Vlv2TbltDevicePkg/bldX64.bat | 216 ------------------------ > Vlv2TbltDevicePkg/bld_vlv.bat | 129 ++++++++------ > Vlv2TbltDevicePkg/bld_vlv.sh | 3 +- > 6 files changed, 124 insertions(+), 280 deletions(-) delete mode 100644 > Vlv2TbltDevicePkg/bldX64.bat >=20 > diff --git a/Vlv2TbltDevicePkg/.gitignore b/Vlv2TbltDevicePkg/.gitignore > index b4699122b8..c7698262ad 100644 > --- a/Vlv2TbltDevicePkg/.gitignore > +++ b/Vlv2TbltDevicePkg/.gitignore > @@ -1,3 +1,5 @@ > AutoPlatformCFG.txt > Stitch/Stitching.log > Stitch/MNW*.bin > +Stitch/MNW*.rom > +Stitch/MNW*.rom.orig > diff --git a/Vlv2TbltDevicePkg/Build_IFWI.bat > b/Vlv2TbltDevicePkg/Build_IFWI.bat > index 9a3063397e..887206703a 100644 > --- a/Vlv2TbltDevicePkg/Build_IFWI.bat > +++ b/Vlv2TbltDevicePkg/Build_IFWI.bat > @@ -1,7 +1,7 @@ > @REM @file > @REM Windows batch file to build BIOS ROM > @REM > -@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<= BR> > +@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights > +reserved.
> @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM >=20 > @@ -18,11 +18,26 @@ set exitCode=3D0 > set "Build_Flags=3D " > set "Stitch_Flags=3D " > set Arch=3DX64 > -set WORKSPACE=3D%CD% > -set CORE_PATH=3D%WORKSPACE%\edk2 > -set PLATFORM_PATH=3D%WORKSPACE%\edk2 > set PLATFORM_PACKAGE=3DVlv2TbltDevicePkg >=20 > +set PLATFORM_PATH=3D%WORKSPACE% > +if not exist %PLATFORM_PATH%\%PLATFORM_PACKAGE% ( > + if defined PACKAGES_PATH ( > + for %%i IN (%PACKAGES_PATH%) DO ( > + if exist %%~fi\%PLATFORM_PACKAGE% ( > + set PLATFORM_PATH=3D%%~fi > + goto PlatformPackageFound > + ) > + ) > + ) else ( > + echo. > + echo !!! ERROR !!! Cannot find %PLATFORM_PACKAGE% !!! > + echo. > + goto Exit > + ) > +) > +:PlatformPackageFound > + > :: Parse Optional arguments > :OptLoop > if /i "%~1"=3D=3D"/?" goto Usage > @@ -125,11 +140,11 @@ if %ERRORLEVEL% NEQ 0 ( echo. > echo Finished Building BIOS. > @REM Set BIOS_ID environment variable here. > -call %CORE_PATH%\Conf\BiosId.bat > +call %WORKSPACE%\Conf\BiosId.bat > echo BIOS_ID=3D%BIOS_ID% >=20 > :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor > environment variables -find /v "#" %CORE_PATH%\Conf\BiosId.env > > ver_strings > +find /v "#" %WORKSPACE%\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 set > BIOS_Name=3D%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR% > _%VERSION_MINOR%.ROM > @@ -137,10 +152,10 @@ set > BIOS_Name=3D%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR% > _%VERSION_MINOR%.ROM > :: Start Integration process > 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 IFWI Stitching Script... > -pushd %CORE_PATH%\%PLATFORM_PACKAGE%\Stitch > +pushd %PLATFORM_PATH%\%PLATFORM_PACKAGE%\Stitch >=20 > :: IFWIStitch.bat [/nG] [/nM] [/nB] [/B BIOS.rom] [/C StitchConfig] [/= S > IFWISuffix] > - call IFWIStitch.bat %Stitch_Flags% /B ..\..\%BIOS_Name% %IFWI_Suffix% > + call IFWIStitch.bat %Stitch_Flags% /B %BIOS_Name% %IFWI_Suffix% >=20 > @echo off > popd > diff --git a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat > b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat > index 7c3ebbd1c6..200ca05a23 100644 > --- a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat > +++ b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat > @@ -1,7 +1,7 @@ > @REM @file > @REM Windows batch file to build BIOS ROM > @REM > -@REM Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved= .
> +@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved= .
> @REM > @REM SPDX-License-Identifier: BSD-2-Clause-Patent > @REM > @@ -9,6 +9,25 @@ > @echo off > SetLocal EnableDelayedExpansion EnableExtensions >=20 > +set PLATFORM_BIN_PACKAGE=3D%WORKSPACE%\Vlv2SocBinPkg > +if not exist %PLATFORM_BIN_PACKAGE% ( > + if defined PACKAGES_PATH ( > + for %%i IN (%PACKAGES_PATH%) DO ( > + if exist %%~fi\Vlv2SocBinPkg ( > + set PLATFORM_BIN_PACKAGE=3D%%~fi\Vlv2SocBinPkg > + goto PlatformBinPackageFound > + ) > + ) > + ) else ( > + echo. > + echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!! > + echo. > + goto BldFail > + ) > +) > +:PlatformBinPackageFound > + > + > :: Set script defaults > set exitCode=3D0 > set BackupRom=3D1 > @@ -185,7 +204,7 @@ for %%i in (%BIOS_Names%) do ( > echo Generating IFWI... %BIOS_ID%.bin > echo. >=20 > - copy /b/y !IFWI_HEADER_FILE! > + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin > + ..\..\..\silicon\Vlv2SocBinPkg\SEC\!SEC_VERSION!\Vacant.bin > + !BIOS_Rom! %BIOS_ID%.bin > + copy /b/y !IFWI_HEADER_FILE! + > + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin > + > + %PLATFORM_BIN_PACKAGE%\SEC\!SEC_VERSION!\Vacant.bin > + !BIOS_Rom! > + %BIOS_ID%.bin > echo. > 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 > ) > diff --git a/Vlv2TbltDevicePkg/bldX64.bat b/Vlv2TbltDevicePkg/bldX64.bat > deleted file mode 100644 index 50dc5b1f07..0000000000 > --- a/Vlv2TbltDevicePkg/bldX64.bat > +++ /dev/null > @@ -1,216 +0,0 @@ > -@REM @file > -@REM Windows batch file to build BIOS ROM > -@REM > -@REM Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<= BR> - > @REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM > - > -@echo off > -@echo. > -@time /t > - > -@if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log -@if > exist %WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log -@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%\Conf\target.txt > del %WORKSPACE%\Conf\target.txt -@if > exist %WORKSPACE%\Conf\tools_def.txt > del %WORKSPACE%\Conf\tools_def.txt -@if exist conf\.cache rmdir /q /s > conf\.cache > - > -@set target=3DDEBUG > - > -@if /i "%1" =3D=3D "release" set TARGET=3DRELEASE -@if /i "%2" =3D=3D "r= elease" set > TARGET=3DRELEASE -@if /i "%3" =3D=3D "release" set TARGET=3DRELEASE -@if = /i "%4" > =3D=3D "release" set TARGET=3DRELEASE -@if /i "%5" =3D=3D "release" set > TARGET=3DRELEASE > - > -@set PlatformType=3DNO_PLATFORM > -@set config_file=3D.\Vlv2TbltDevicePkg\PlatformPkgConfig.dsc > -@set EVN_debug_file=3D.\Vlv2TbltDevicePkg\BiosIdx64D.env > -@set EVN_release_file=3D.\Vlv2TbltDevicePkg\BiosIdx64R.env > -@set auto_config_inc=3D.\Vlv2TbltDevicePkg\AutoPlatformCFG.txt > - > -@if "%1" =3D=3D "MNW2" ( > - set %PlatformType% =3D MNW2 > - @echo Setting Baley Bay platform configration and BIOS ID ... > - findstr /b /v BOARD_ID %EVN_debug_file% > newfile.env > - echo BOARD_ID =3D MNW2MAX >> newfile.env > - type newfile.env > %EVN_debug_file% > - findstr /b /v BOARD_ID %EVN_release_file% > newfile.env > - echo BOARD_ID =3D MNW2MAX >> newfile.env > - type newfile.env > %EVN_release_file% > - echo DEFINE ENBDT_PF_BUILD =3D TRUE >> %auto_config_inc% > - echo DEFINE X64_CONFIG =3D TRUE >> %auto_config_inc% > - goto PLATFORM_SETTING_DONE > -) > - > -@if "%PlatformType%" =3D=3D "NO_PLATFORM" ( > - goto BldFail > -) > - > -rem clearup the temp file > -:PLATFORM_SETTING_DONE > -@DEL NEWFILE.ENV > -@DEL NEWFILE.CFG > - > -@REM Define platform specific environment variables. > -@REM > -@set PLATFORM_PACKAGE=3DVlv2TbltDevicePkg > -@set SCRIPT_ERROR=3D0 > - > -@REM Set basic environment. > -@echo. > -@echo Run edksetup.bat batch file. > -@echo. > -@del Conf\build_rule.txt > -@REM @del Conf\tools_def.txt > -@call edksetup.bat > - > - > -@echo. > -@echo Set the VS2008 environment. > -@echo. > -@if defined VS90COMNTOOLS ( > - if not defined VSINSTALLDIR call "%VS90COMNTOOLS%\vsvars32.bat" > - if /I "%VS90COMNTOOLS%" =3D=3D "C:\Program Files\Microsoft Visual Stud= io > 9.0\Common7\Tools\" ( > - set TOOL_CHAIN_TAG=3DVS2008 > - ) else ( > - set TOOL_CHAIN_TAG=3DVS2008x86 > - ) > -) else ( > - echo. > - echo !!! ERROR !!! VS2008 not installed correctly. VS90COMNTOOLS not > defined. !!! > - echo. > - set SCRIPT_ERROR=3D1 > - goto :BldEnd > -) > - > -@echo. > -@echo Set build environment. > -@echo. > -@if not exist > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG% ( > - mkdir Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG% > -) > - > - > -@REM Set clean build option > -@set CLEAN_BUILD_OPTION=3D-e > - > -@findstr /V "ACTIVE_PLATFORM TARGET TARGET_ARCH TOOL_CHAIN_TAG > BUILD_RULE_CONF" Conf\target.txt > > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t > xt > - > -@echo ACTIVE_PLATFORM > =3D %PLATFORM_PACKAGE%/PlatformPkgX64.dsc >> > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t > xt > -@echo TARGET =3D %TARGET% >> > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t > xt > -@echo TARGET_ARCH =3D IA32 X64 >> > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t > xt > -@echo TOOL_CHAIN_TAG =3D %TOOL_CHAIN_TAG% >> > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t > xt > -@echo BUILD_RULE_CONF =3D Conf/build_rule.txt >> > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t > xt > -@move /Y > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t > xt Conf > - > - > - > -@echo. > -@echo Create BiosIdx64. > -@echo. > -@if not exist > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64 ( > - mkdir > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64 > -) > - > -@if "%TARGET%" =3D=3D "DEBUG" ( > - set BIOS_ID_FILE=3DBiosIdx64D.env > - > -) else ( > - set BIOS_ID_FILE=3DBiosIdx64R.env > - > -) > - > - > -GenBiosId.exe -i %PLATFORM_PACKAGE%\%BIOS_ID_FILE% -o > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\X64\Bio > sId.bin > -@if %ERRORLEVEL% NEQ 0 goto BldFail > - > -@echo off > -echo Copy reference code ASL files. > - > - > -@if /i "/s" =3D=3D "%1" goto BldSilent > -@if /i "/s" =3D=3D "%2" goto BldSilent > -@if /i "/s" =3D=3D "%3" goto BldSilent > -@if /i "/s" =3D=3D "%4" goto BldSilent > -@if /i "/s" =3D=3D "%5" goto BldSilent > - > -build -n %NUMBER_OF_PROCESSORS% > -@if %ERRORLEVEL% NEQ 0 goto BldFail > - > -@If %SCRIPT_ERROR% EQU 1 goto BldFail > -@goto BldSuccess > - > -:BldSilent > - > -build -n %NUMBER_OF_PROCESSORS% 1>>EDK2.log 2>&1 - > @if %ERRORLEVEL% NEQ 0 goto BldFail > - > - > -@If %SCRIPT_ERROR% EQU 1 goto BldFail > - > -:BldSuccess > -@echo off > -del > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX > 64.beforeconfig.fd 1>>EDK2.log 2>&1 -del > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiD > efaultData.txt 1>>EDK2.log 2>&1 > -copy /y > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.f > d > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX > 64.beforeconfig.fd 1>>EDK2.log 2>&1 > - > -@echo. > -@echo Extract setup default value from VFR > (Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Hii > DefaultData.txt) > -@echo. > -fce read -i > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX > 64.beforeconfig.fd > > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiD > efaultData.txt > - > - > -@echo Update FD with default Hii value successfully! (both 'Setup' and > 'SetupDefault') -@echo. > -fce mirror -i > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX > 64.beforeconfig.fd -o > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX > 64.fd Setup SetupDefault 1>>EDK2.log 2>&1 > - > -@echo off > -del > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.f > d > -del Vlv2TbltDevicePkg\RomImage\bios.rom > -if not exist > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM > goto Gen8MImage -del /q /f > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\* > -rd /Q > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM > -:Gen8MImage > - > -copy /b > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX > 64.fd Vlv2TbltDevicePkg\RomImage\bios.rom > - > -pushd Vlv2TbltDevicePkg\RomImage\ > -@if "%TARGET%" =3D=3D "DEBUG" ( > - call signbiosX64_debug.bat > -) else ( > - call signbiosX64_release.bat > -) > - > -call ftoolbuild.bat > -call ftoolbuild_sec_enable.bat > -popd > - > -@echo off > -mkdir > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM > -move Vlv2TbltDevicePkg\RomImage\SPI_Image\* > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM\ > > NUL > - > -call GenBIOS.bat X64 > - > -@echo on > - > -@echo TARGET: %TARGET% > -@echo TOOL_CHAIN_TAG: %TOOL_CHAIN_TAG% > -@echo BIOS location: > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV > -@echo SPI Images location: > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\ROM > -@echo. > -@echo The EDKII BIOS build has successfully completed! > -@echo. > -@goto BldEnd > - > -:BldFail > -@echo. > -@echo The EDKII BIOS Build has failed! > -@echo. > -exit /b 1 > - > -:BldEnd > -@time /t > -exit /b 0 > diff --git a/Vlv2TbltDevicePkg/bld_vlv.bat b/Vlv2TbltDevicePkg/bld_vlv.ba= t > index c5314833c0..dcc8b1a95a 100644 > --- a/Vlv2TbltDevicePkg/bld_vlv.bat > +++ b/Vlv2TbltDevicePkg/bld_vlv.bat > @@ -1,7 +1,7 @@ > @REM @file > @REM Windows batch file to build BIOS ROM > @REM > -@REM Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<= BR> > +@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights > +reserved.
> @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM >=20 > @@ -15,25 +15,60 @@ echo. > ::********************************************************* > ************* > :: Initial Setup > ::********************************************************* > ************* > -set WORKSPACE=3D%CD% > if %WORKSPACE:~-1%=3D=3D\ set WORKSPACE=3D%WORKSPACE:~0,-1% set /a > build_threads=3D1 set "Build_Flags=3D " > set exitCode=3D0 > set Arch=3DX64 > set Source=3D0 > -set CORE_PATH=3D%WORKSPACE%\edk2 > -set PLATFORM_PATH=3D%WORKSPACE%\edk2 > -cd ./edk2 > +set PLATFORM_NAME=3DVlv2TbltDevicePkg > + > +set CORE_PATH=3D%WORKSPACE% > +if not exist %CORE_PATH%\edksetup.bat ( > + if defined PACKAGES_PATH ( > + for %%i IN (%PACKAGES_PATH%) DO ( > + if exist %%~fi\edksetup.bat ( > + set CORE_PATH=3D%%~fi > + goto CorePathFound > + ) > + ) > + ) else ( > + echo. > + echo !!! ERROR !!! Cannot find edksetup.bat !!! > + echo. > + goto BldFail > + ) > +) > +:CorePathFound > + > +set PLATFORM_PACKAGE=3D%WORKSPACE%\%PLATFORM_NAME% > +if not exist %PLATFORM_PACKAGE% ( > + if defined PACKAGES_PATH ( > + for %%i IN (%PACKAGES_PATH%) DO ( > + if exist %%~fi\%PLATFORM_NAME% ( > + set PLATFORM_PACKAGE=3D%%~fi\%PLATFORM_NAME% > + goto PlatformPackageFound > + ) > + ) > + ) else ( > + echo. > + echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!! > + echo. > + goto BldFail > + ) > +) > +:PlatformPackageFound > + > +cd %CORE_PATH% >=20 > :: Clean up previous build files. > -if exist %CORE_PATH%\edk2.log del %CORE_PATH%\edk2.log -if > exist %CORE_PATH%\unitool.log del %CORE_PATH%\unitool.log -if > exist %CORE_PATH%\Conf\target.txt del %CORE_PATH%\Conf\target.txt -if > exist %CORE_PATH%\Conf\tools_def.txt > del %CORE_PATH%\Conf\tools_def.txt -if > exist %CORE_PATH%\Conf\build_rule.txt > del %CORE_PATH%\Conf\build_rule.txt -if > exist %CORE_PATH%\Conf\FrameworkDatabase.db > del %CORE_PATH%\Conf\FrameworkDatabase.db > -if exist conf\.cache rmdir /q/s conf\.cache > +if exist %WORKSPACE%\edk2.log del %WORKSPACE%\edk2.log if exist > +%WORKSPACE%\unitool.log del %WORKSPACE%\unitool.log 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%\Conf\.cache rmdir > /q/s %WORKSPACE%\Conf\.cache >=20 > :: 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 @@ -41,8 +76,6 @@ > call %CORE_PATH%\edksetup.bat Rebuild @echo off >=20 > :: Define platform specific environment variables. > -set PLATFORM_NAME=3DVlv2TbltDevicePkg > -set PLATFORM_PACKAGE=3D%PLATFORM_PATH%\Vlv2TbltDevicePkg > set config_file=3D%PLATFORM_PACKAGE%\PlatformPkgConfig.dsc > set auto_config_inc=3D%PLATFORM_PACKAGE%\AutoPlatformCFG.txt >=20 > @@ -82,9 +115,9 @@ if /i "%~1" =3D=3D "/c" ( > 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 > + if exist %WORKSPACE%\Conf\.cache ( > + del /f/s/q %WORKSPACE%\Conf\.cache > nul > + rmdir /s/q %WORKSPACE%\Conf\.cache > ) > echo. > shift > @@ -107,17 +140,17 @@ if "%~1"=3D=3D"" goto Usage >=20 > ::Remove the values for Platform_Type and Build_Target from BiosIdX.env > and stage in Conf\ if "%Arch%"=3D=3D"IA32" ( > - findstr /b /v "BOARD_ID > BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env > Conf\BiosId.env > + findstr /b /v "BOARD_ID > BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdR.env > + > %WORKSPACE%\Conf\BiosId.env > echo DEFINE X64_CONFIG =3D FALSE >> %auto_config_inc% > ) else if "%Arch%"=3D=3D"X64" ( > - findstr /b /v "BOARD_ID > BUILD_TYPE" %PLATFORM_PACKAGE%\BiosIdx64R.env > Conf\BiosId.env > + findstr /b /v "BOARD_ID BUILD_TYPE" > + %PLATFORM_PACKAGE%\BiosIdx64R.env > %WORKSPACE%\Conf\BiosId. > env > echo DEFINE X64_CONFIG =3D TRUE >> %auto_config_inc% > ) >=20 > :: -- Build flags settings for each Platform -- echo Setting %1 platf= orm > configuration and BIOS ID... > if /i "%~1" =3D=3D "MNW2" ( > - echo BOARD_ID =3D MNW2MAX >> Conf\BiosId.env > + echo BOARD_ID =3D MNW2MAX >> %WORKSPACE%\Conf\BiosId.env > echo DEFINE ENBDT_PF_BUILD =3D TRUE >> %auto_config_inc% >=20 > ) else ( > @@ -128,10 +161,10 @@ set Platform_Type=3D%~1 >=20 > if /i "%~2" =3D=3D "RELEASE" ( > set target=3DRELEASE > - echo BUILD_TYPE =3D R >> Conf\BiosId.env > + echo BUILD_TYPE =3D R >> %WORKSPACE%\Conf\BiosId.env > ) else ( > set target=3DDEBUG > - echo BUILD_TYPE =3D D >> Conf\BiosId.env > + echo BUILD_TYPE =3D D >> %WORKSPACE%\Conf\BiosId.env > ) >=20 > ::********************************************************* > ************* > @@ -181,43 +214,40 @@ if defined VS140COMNTOOLS ( > ) >=20 > echo Ensuring correct build directory is present for GenBiosId... > -set > BUILD_PATH=3DBuild\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG% > +set > +BUILD_PATH=3D%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_% > TOOL_CHAIN_TAG% >=20 > echo Modifing Conf files for this build... > :: Remove lines with these tags from target.txt -findstr /V "TARGET > TARGET_ARCH TOOL_CHAIN_TAG BUILD_RULE_CONF ACTIVE_PLATFORM > MAX_CONCURRENT_THREAD_NUMBER" Conf\target.txt > > Conf\target.txt.tmp > +findstr /V "TARGET TARGET_ARCH TOOL_CHAIN_TAG BUILD_RULE_CONF > +ACTIVE_PLATFORM MAX_CONCURRENT_THREAD_NUMBER" > +%WORKSPACE%\Conf\target.txt > %WORKSPACE%\Conf\target.txt.tmp >=20 > -echo TARGET =3D %TARGET% >> Co= nf\target.txt.tmp > +echo TARGET > =3D %TARGET% >> %WORKSPACE%\Conf\target.= txt.tmp > if "%Arch%"=3D=3D"IA32" ( > - echo TARGET_ARCH =3D IA32 >> C= onf\target.txt.tmp > + echo TARGET_ARCH =3D > IA32 >> %WORKSPACE%\Conf\target.txt= .tmp > ) else if "%Arch%"=3D=3D"X64" ( > - echo TARGET_ARCH =3D IA32 X64 >> Co= nf\target.txt.tmp > + echo TARGET_ARCH =3D IA32 > X64 >> %WORKSPACE%\Conf\target.txt.tmp > ) > -echo TOOL_CHAIN_TAG =3D %TOOL_CHAIN_TAG% = >> > Conf\target.txt.tmp > -echo BUILD_RULE_CONF =3D Conf/build_rule.txt = >> > Conf\target.txt.tmp > +echo TOOL_CHAIN_TAG > =3D %TOOL_CHAIN_TAG% >> %WORKSPACE%\Conf= \target.txt > .tmp > +echo BUILD_RULE_CONF =3D > Conf/build_rule.txt >> %WORKSPACE%\Conf\tar= get.txt.tmp > if %Source% =3D=3D 0 ( > - echo ACTIVE_PLATFORM > =3D %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc >> > Conf\target.txt.tmp > + echo ACTIVE_PLATFORM > =3D %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc >> %WORKSPACE% > \Conf\target.txt.tmp > ) else ( > - echo ACTIVE_PLATFORM > =3D %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc >> > Conf\target.txt.tmp > + echo ACTIVE_PLATFORM > =3D %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc > + >> %WORKSPACE%\Conf\target.txt.tmp > ) > -echo MAX_CONCURRENT_THREAD_NUMBER > =3D %build_threads% >> Conf\target.txt.tmp > +echo MAX_CONCURRENT_THREAD_NUMBER > =3D %build_threads% >> %WORKSPACE%\Conf\target.txt.t= mp >=20 > -move /Y Conf\target.txt.tmp Conf\target.txt >nul > +move > /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Conf\target.txt > +>nul >=20 > ::********************************************************* > ************* > :: Build BIOS > ::********************************************************* > ************* >=20 > echo Creating BiosId... > -pushd %PLATFORM_PACKAGE% > -if not exist %WORKSPACE%\%BUILD_PATH%\IA32 > mkdir %WORKSPACE%\%BUILD_PATH%\IA32 > - GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env - > o %WORKSPACE%\%BUILD_PATH%\IA32\BiosId.bin - > ob %CORE_PATH%\Conf\BiosId.bat > +if not exist %BUILD_PATH%\IA32 mkdir %BUILD_PATH%\IA32 > +%PLATFORM_PACKAGE%\GenBiosId.exe - > i %WORKSPACE%\Conf\BiosId.env -o > +%BUILD_PATH%\IA32\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat > if "%Arch%"=3D=3D"X64" ( > - if not exist %WORKSPACE%\%BUILD_PATH%\X64 > mkdir %WORKSPACE%\%BUILD_PATH%\X64 > - GenBiosId.exe -i %CORE_PATH%\Conf\BiosId.env - > o %WORKSPACE%\%BUILD_PATH%\X64\BiosId.bin - > ob %CORE_PATH%\Conf\BiosId.bat > + if not exist %BUILD_PATH%\X64 mkdir %BUILD_PATH%\X64 > + %PLATFORM_PACKAGE%\GenBiosId.exe - > i %WORKSPACE%\Conf\BiosId.env -o > + %BUILD_PATH%\X64\BiosId.bin -ob %WORKSPACE%\Conf\BiosId.bat > ) > -popd > - >=20 > if %ERRORLEVEL% NEQ 0 goto BldFail >=20 > @@ -235,23 +265,23 @@ echo Running fce... >=20 > pushd %PLATFORM_PACKAGE% > :: Extract Hii data from build and store in HiiDefaultData.txt -fce read= - > i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd > %WORKSPACE%\%BUILD_PA > TH%\FV\HiiDefaultData.txt > +%PLATFORM_PACKAGE%\fce read -i %BUILD_PATH%\FV\Vlv.fd > > +%BUILD_PATH%\FV\HiiDefaultData.txt >=20 > :: save changes to VlvXXX.fd > -fce update -i %WORKSPACE%\%BUILD_PATH%\FV\Vlv.fd - > s %WORKSPACE%\%BUILD_PATH%\FV\HiiDefaultData.txt - > o %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd > +%PLATFORM_PACKAGE%\fce update -i %BUILD_PATH%\FV\Vlv.fd -s > +%BUILD_PATH%\FV\HiiDefaultData.txt - > o %BUILD_PATH%\FV\Vlv%Arch%.fd > popd >=20 > if %ERRORLEVEL% NEQ 0 goto BldFail > ::echo FD successfully updated with default Hii values. >=20 > :: Set the Board_Id, Build_Type, Version_Major, and Version_Minor > environment variables -find /v "#" Conf\BiosId.env > ver_strings > +find /v "#" %WORKSPACE%\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 >=20 > set > BIOS_Name=3D%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR% > _%VERSION_MINOR%.ROM > -copy > /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd %PLATFORM_PAT > H%\%BIOS_Name% >nul -copy > /y/b %WORKSPACE%\%BUILD_PATH%\FV\Vlv%Arch%.fd %WORKSPACE%\ > %BUILD_PATH%\FV\Vlv.ROM >nul > +copy /y/b %BUILD_PATH%\FV\Vlv%Arch%.fd > +%PLATFORM_PACKAGE%\Stitch\%BIOS_Name% >nul copy /y/b > +%BUILD_PATH%\FV\Vlv%Arch%.fd %BUILD_PATH%\FV\Vlv.ROM >nul >=20 > echo. > echo Build location: %BUILD_PATH% > @@ -261,13 +291,8 @@ echo -------------------- The EDKII BIOS build has > successfully completed. ----- echo. >=20 > @REM build capsule here > -@REMif "%openssl_path%" =3D=3D "" ( > -@REM echo -- Error: OPENSSL_PATH not set. Capule and Recovery image= s > not generated. > -@REM set exitCode=3D1 > -@REM goto Exit > -@REM > -@REM echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv > -@REM build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc > +echo > %BUILD_PATH%\FV\SYSTEMFIRMWAREUPDATECARGO.Fv > +build -p %PLATFORM_PACKAGE%\PlatformCapsule.dsc >=20 > goto Exit >=20 > diff --git a/Vlv2TbltDevicePkg/bld_vlv.sh b/Vlv2TbltDevicePkg/bld_vlv.sh > index 51d3acacb4..ec3a325db7 100755 > --- a/Vlv2TbltDevicePkg/bld_vlv.sh > +++ b/Vlv2TbltDevicePkg/bld_vlv.sh > @@ -242,9 +242,8 @@ VERSION_MINOR=3D$(grep '^VERSION_MINOR' > Conf/BiosId.env | cut -d ' ' -f 3 | cut -c BOARD_ID=3D$(grep '^BOARD_ID' > Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1-7) > BIOS_Name=3D"$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_ > "$VERSION_MINOR".ROM >=20 > BIOS_ID=3D"$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VE > RSION_MINOR"_GCC.bin > -cp -f $BUILD_PATH/FV/VLV.fd $WORKSPACE/$BIOS_Name > SEC_VERSION=3D1.0.2.1060v5 > -cat > $IFWI_HEADER_FILE ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/VLV_SEC_RE > GION.bin ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/Vacant.bin > $BIOS_Name > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID > +cat $IFWI_HEADER_FILE > +../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/VLV_SEC_REGION.bin > +../Vlv2Binaries/Vlv2SocBinPkg/SEC/$SEC_VERSION/Vacant.bin > +$BUILD_PATH/FV/VLV.fd > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID >=20 >=20 > echo Skip "Running BIOS_Signing ..." > -- > 2.21.0.windows.1