From: "Sun, Zailiang" <zailiang.sun@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Qian, Yi" <yi.qian@intel.com>
Subject: Re: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts
Date: Thu, 9 May 2019 07:55:01 +0000 [thread overview]
Message-ID: <7CB7EF03E15B5D48981329A508747A9850C62EA4@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190509043111.15272-13-michael.d.kinney@intel.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
> -----Original Message-----
> From: Kinney, Michael D
> Sent: Thursday, May 9, 2019 12:31 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
> Subject: [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions
> from build scripts
>
> 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.
>
> Cc: Zailiang Sun <zailiang.sun@intel.com>
> Cc: Yi Qian <yi.qian@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
> 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
>
> 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.<BR>
> @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
>
> @@ -18,11 +18,26 @@ set exitCode=0
> set "Build_Flags= "
> set "Stitch_Flags= "
> set Arch=X64
> -set WORKSPACE=%CD%
> -set CORE_PATH=%WORKSPACE%\edk2
> -set PLATFORM_PATH=%WORKSPACE%\edk2
> set PLATFORM_PACKAGE=Vlv2TbltDevicePkg
>
> +set PLATFORM_PATH=%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=%%~fi
> + goto PlatformPackageFound
> + )
> + )
> + ) else (
> + echo.
> + echo !!! ERROR !!! Cannot find %PLATFORM_PACKAGE% !!!
> + echo.
> + goto Exit
> + )
> +)
> +:PlatformPackageFound
> +
> :: Parse Optional arguments
> :OptLoop
> if /i "%~1"=="/?" 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=%BIOS_ID%
>
> :: 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=1,3" %%i in (ver_strings) do set %%i=%%j del /f/q
> ver_strings >nul set
> BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%
> _%VERSION_MINOR%.ROM
> @@ -137,10 +152,10 @@ set
> BIOS_Name=%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%
> _%VERSION_MINOR%.ROM
> :: Start Integration process
> echo
> ==========================================================
> ============
> echo Build_IFWI: Calling IFWI Stitching Script...
> -pushd %CORE_PATH%\%PLATFORM_PACKAGE%\Stitch
> +pushd %PLATFORM_PATH%\%PLATFORM_PACKAGE%\Stitch
>
> :: 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%
>
> @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.<BR>
> +@REM Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
> @REM
> @REM SPDX-License-Identifier: BSD-2-Clause-Patent
> @REM
> @@ -9,6 +9,25 @@
> @echo off
> SetLocal EnableDelayedExpansion EnableExtensions
>
> +set PLATFORM_BIN_PACKAGE=%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=%%~fi\Vlv2SocBinPkg
> + goto PlatformBinPackageFound
> + )
> + )
> + ) else (
> + echo.
> + echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
> + echo.
> + goto BldFail
> + )
> +)
> +:PlatformBinPackageFound
> +
> +
> :: Set script defaults
> set exitCode=0
> set BackupRom=1
> @@ -185,7 +204,7 @@ for %%i in (%BIOS_Names%) do (
> echo Generating IFWI... %BIOS_ID%.bin
> echo.
>
> - 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
> ==========================================================
> =================
> )
> 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=DEBUG
> -
> -@if /i "%1" == "release" set TARGET=RELEASE -@if /i "%2" == "release" set
> TARGET=RELEASE -@if /i "%3" == "release" set TARGET=RELEASE -@if /i "%4"
> == "release" set TARGET=RELEASE -@if /i "%5" == "release" set
> TARGET=RELEASE
> -
> -@set PlatformType=NO_PLATFORM
> -@set config_file=.\Vlv2TbltDevicePkg\PlatformPkgConfig.dsc
> -@set EVN_debug_file=.\Vlv2TbltDevicePkg\BiosIdx64D.env
> -@set EVN_release_file=.\Vlv2TbltDevicePkg\BiosIdx64R.env
> -@set auto_config_inc=.\Vlv2TbltDevicePkg\AutoPlatformCFG.txt
> -
> -@if "%1" == "MNW2" (
> - set %PlatformType% = MNW2
> - @echo Setting Baley Bay platform configration and BIOS ID ...
> - findstr /b /v BOARD_ID %EVN_debug_file% > newfile.env
> - echo BOARD_ID = MNW2MAX >> newfile.env
> - type newfile.env > %EVN_debug_file%
> - findstr /b /v BOARD_ID %EVN_release_file% > newfile.env
> - echo BOARD_ID = MNW2MAX >> newfile.env
> - type newfile.env > %EVN_release_file%
> - echo DEFINE ENBDT_PF_BUILD = TRUE >> %auto_config_inc%
> - echo DEFINE X64_CONFIG = TRUE >> %auto_config_inc%
> - goto PLATFORM_SETTING_DONE
> -)
> -
> -@if "%PlatformType%" == "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=Vlv2TbltDevicePkg
> -@set SCRIPT_ERROR=0
> -
> -@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%" == "C:\Program Files\Microsoft Visual Studio
> 9.0\Common7\Tools\" (
> - set TOOL_CHAIN_TAG=VS2008
> - ) else (
> - set TOOL_CHAIN_TAG=VS2008x86
> - )
> -) else (
> - echo.
> - echo !!! ERROR !!! VS2008 not installed correctly. VS90COMNTOOLS not
> defined. !!!
> - echo.
> - set SCRIPT_ERROR=1
> - 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=-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
> = %PLATFORM_PACKAGE%/PlatformPkgX64.dsc >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo TARGET = %TARGET% >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo TARGET_ARCH = IA32 X64 >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo TOOL_CHAIN_TAG = %TOOL_CHAIN_TAG% >>
> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.t
> xt
> -@echo BUILD_RULE_CONF = 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%" == "DEBUG" (
> - set BIOS_ID_FILE=BiosIdx64D.env
> -
> -) else (
> - set BIOS_ID_FILE=BiosIdx64R.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" == "%1" goto BldSilent
> -@if /i "/s" == "%2" goto BldSilent
> -@if /i "/s" == "%3" goto BldSilent
> -@if /i "/s" == "%4" goto BldSilent
> -@if /i "/s" == "%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%" == "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.bat
> 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.<BR>
> @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM
>
> @@ -15,25 +15,60 @@ echo.
> ::*********************************************************
> *************
> :: Initial Setup
> ::*********************************************************
> *************
> -set WORKSPACE=%CD%
> if %WORKSPACE:~-1%==\ set WORKSPACE=%WORKSPACE:~0,-1% set /a
> build_threads=1 set "Build_Flags= "
> set exitCode=0
> set Arch=X64
> set Source=0
> -set CORE_PATH=%WORKSPACE%\edk2
> -set PLATFORM_PATH=%WORKSPACE%\edk2
> -cd ./edk2
> +set PLATFORM_NAME=Vlv2TbltDevicePkg
> +
> +set CORE_PATH=%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=%%~fi
> + goto CorePathFound
> + )
> + )
> + ) else (
> + echo.
> + echo !!! ERROR !!! Cannot find edksetup.bat !!!
> + echo.
> + goto BldFail
> + )
> +)
> +:CorePathFound
> +
> +set PLATFORM_PACKAGE=%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=%%~fi\%PLATFORM_NAME%
> + goto PlatformPackageFound
> + )
> + )
> + ) else (
> + echo.
> + echo !!! ERROR !!! Cannot find %PLATFORM_NAME% !!!
> + echo.
> + goto BldFail
> + )
> +)
> +:PlatformPackageFound
> +
> +cd %CORE_PATH%
>
> :: 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
>
> :: 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
>
> :: Define platform specific environment variables.
> -set PLATFORM_NAME=Vlv2TbltDevicePkg
> -set PLATFORM_PACKAGE=%PLATFORM_PATH%\Vlv2TbltDevicePkg
> set config_file=%PLATFORM_PACKAGE%\PlatformPkgConfig.dsc
> set auto_config_inc=%PLATFORM_PACKAGE%\AutoPlatformCFG.txt
>
> @@ -82,9 +115,9 @@ if /i "%~1" == "/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"=="" goto Usage
>
> ::Remove the values for Platform_Type and Build_Target from BiosIdX.env
> and stage in Conf\ if "%Arch%"=="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 = FALSE >> %auto_config_inc%
> ) else if "%Arch%"=="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 = TRUE >> %auto_config_inc%
> )
>
> :: -- Build flags settings for each Platform -- echo Setting %1 platform
> configuration and BIOS ID...
> if /i "%~1" == "MNW2" (
> - echo BOARD_ID = MNW2MAX >> Conf\BiosId.env
> + echo BOARD_ID = MNW2MAX >> %WORKSPACE%\Conf\BiosId.env
> echo DEFINE ENBDT_PF_BUILD = TRUE >> %auto_config_inc%
>
> ) else (
> @@ -128,10 +161,10 @@ set Platform_Type=%~1
>
> if /i "%~2" == "RELEASE" (
> set target=RELEASE
> - echo BUILD_TYPE = R >> Conf\BiosId.env
> + echo BUILD_TYPE = R >> %WORKSPACE%\Conf\BiosId.env
> ) else (
> set target=DEBUG
> - echo BUILD_TYPE = D >> Conf\BiosId.env
> + echo BUILD_TYPE = D >> %WORKSPACE%\Conf\BiosId.env
> )
>
> ::*********************************************************
> *************
> @@ -181,43 +214,40 @@ if defined VS140COMNTOOLS (
> )
>
> echo Ensuring correct build directory is present for GenBiosId...
> -set
> BUILD_PATH=Build\%PLATFORM_NAME%\%TARGET%_%TOOL_CHAIN_TAG%
> +set
> +BUILD_PATH=%WORKSPACE%\Build\%PLATFORM_NAME%\%TARGET%_%
> TOOL_CHAIN_TAG%
>
> 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
>
> -echo TARGET = %TARGET% >> Conf\target.txt.tmp
> +echo TARGET
> = %TARGET% >> %WORKSPACE%\Conf\target.txt.tmp
> if "%Arch%"=="IA32" (
> - echo TARGET_ARCH = IA32 >> Conf\target.txt.tmp
> + echo TARGET_ARCH =
> IA32 >> %WORKSPACE%\Conf\target.txt.tmp
> ) else if "%Arch%"=="X64" (
> - echo TARGET_ARCH = IA32 X64 >> Conf\target.txt.tmp
> + echo TARGET_ARCH = IA32
> X64 >> %WORKSPACE%\Conf\target.txt.tmp
> )
> -echo TOOL_CHAIN_TAG = %TOOL_CHAIN_TAG% >>
> Conf\target.txt.tmp
> -echo BUILD_RULE_CONF = Conf/build_rule.txt >>
> Conf\target.txt.tmp
> +echo TOOL_CHAIN_TAG
> = %TOOL_CHAIN_TAG% >> %WORKSPACE%\Conf\target.txt
> .tmp
> +echo BUILD_RULE_CONF =
> Conf/build_rule.txt >> %WORKSPACE%\Conf\target.txt.tmp
> if %Source% == 0 (
> - echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc >>
> Conf\target.txt.tmp
> + echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%.dsc >> %WORKSPACE%
> \Conf\target.txt.tmp
> ) else (
> - echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc >>
> Conf\target.txt.tmp
> + echo ACTIVE_PLATFORM
> = %PLATFORM_PACKAGE%/PlatformPkg%Arch%Source.dsc
> + >> %WORKSPACE%\Conf\target.txt.tmp
> )
> -echo MAX_CONCURRENT_THREAD_NUMBER
> = %build_threads% >> Conf\target.txt.tmp
> +echo MAX_CONCURRENT_THREAD_NUMBER
> = %build_threads% >> %WORKSPACE%\Conf\target.txt.tmp
>
> -move /Y Conf\target.txt.tmp Conf\target.txt >nul
> +move
> /Y %WORKSPACE%\Conf\target.txt.tmp %WORKSPACE%\Conf\target.txt
> +>nul
>
> ::*********************************************************
> *************
> :: Build BIOS
> ::*********************************************************
> *************
>
> 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%"=="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
> -
>
> if %ERRORLEVEL% NEQ 0 goto BldFail
>
> @@ -235,23 +265,23 @@ echo Running fce...
>
> 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
>
> :: 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
>
> if %ERRORLEVEL% NEQ 0 goto BldFail
> ::echo FD successfully updated with default Hii values.
>
> :: 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=1,3" %%i in (ver_strings) do set %%i=%%j del /f/q
> ver_strings >nul
>
> set
> BIOS_Name=%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
>
> echo.
> echo Build location: %BUILD_PATH%
> @@ -261,13 +291,8 @@ echo -------------------- The EDKII BIOS build has
> successfully completed. ----- echo.
>
> @REM build capsule here
> -@REMif "%openssl_path%" == "" (
> -@REM echo -- Error: OPENSSL_PATH not set. Capule and Recovery images
> not generated.
> -@REM set exitCode=1
> -@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
>
> goto Exit
>
> 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=$(grep '^VERSION_MINOR'
> Conf/BiosId.env | cut -d ' ' -f 3 | cut -c BOARD_ID=$(grep '^BOARD_ID'
> Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1-7)
> BIOS_Name="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_
> "$VERSION_MINOR".ROM
>
> BIOS_ID="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VE
> RSION_MINOR"_GCC.bin
> -cp -f $BUILD_PATH/FV/VLV.fd $WORKSPACE/$BIOS_Name
> SEC_VERSION=1.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
>
>
> echo Skip "Running BIOS_Signing ..."
> --
> 2.21.0.windows.1
next prev parent reply other threads:[~2019-05-09 7:55 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 4:30 [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Michael D Kinney
2019-05-09 4:30 ` [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Michael D Kinney
2019-05-09 7:53 ` Sun, Zailiang
2019-05-09 7:53 ` Sun, Zailiang
2019-05-09 13:18 ` Qian, Yi
2019-05-09 4:30 ` [Patch 02/16] Vlv2TbltDevicePkg/AcpiPlatform: Change Size type to UINTN Michael D Kinney
2019-05-09 8:15 ` Sun, Zailiang
2019-05-09 13:19 ` Qian, Yi
2019-05-09 4:30 ` [Patch 03/16] Vlv2TbltDevicePkg/AcpiPlatform: Add variable protocols to depex Michael D Kinney
2019-05-09 7:53 ` Sun, Zailiang
2019-05-09 13:18 ` Qian, Yi
2019-05-09 4:30 ` [Patch 04/16] Vlv2TbltDevicePkg/PpmPolicy: Fix call to MP Services Protocol Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:19 ` Qian, Yi
2019-05-09 4:31 ` [Patch 05/16] Vlv2TbltDevicePkg/SmBiosMiscDxe: Fix GCC build issue Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:19 ` Qian, Yi
2019-05-09 4:31 ` [Patch 06/16] Vlv2TbltDevicePkg: Find UEFI Shell using gUefiShellFileGuid Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:19 ` Qian, Yi
2019-05-09 4:31 ` [Patch 07/16] Vlv2TbltDevicePkg: Build full UEFI Shell from sources Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:19 ` Qian, Yi
2019-05-09 4:31 ` [Patch 08/16] Vlv2TbltDevicePkg: Use CpuDxe from UefiCpuPkg Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:18 ` Qian, Yi
2019-05-09 4:31 ` [Patch 09/16] Vlv2TbltDevicePkg: Add PchInitSmm module Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:20 ` Qian, Yi
2019-05-09 4:31 ` [Patch 10/16] Vlv2TbltDevicePkg: Always enable QuietBoot to produce BGRT Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:20 ` Qian, Yi
2019-05-09 4:31 ` [Patch 11/16] Vlv2TbltDevicePkg/Stitch/Gcc: Update default setting binary Michael D Kinney
2019-05-09 7:54 ` Sun, Zailiang
2019-05-09 13:20 ` Qian, Yi
2019-05-09 4:31 ` [Patch 12/16] Vlv2TbltDevicePkg: Remove directory assumptions from build scripts Michael D Kinney
2019-05-09 7:55 ` Sun, Zailiang [this message]
2019-05-09 13:21 ` Qian, Yi
2019-05-09 4:31 ` [Patch 13/16] Vlv2TbltDevicePkg/Capsule: Do not clear UEFI varstore Michael D Kinney
2019-05-09 7:55 ` Sun, Zailiang
2019-05-09 13:20 ` Qian, Yi
2019-05-09 4:31 ` [Patch 14/16] Vlv2TbltDevicePkg/Capsule: Remove path to openssl tools Michael D Kinney
2019-05-09 7:55 ` Sun, Zailiang
2019-05-09 13:20 ` Qian, Yi
2019-05-09 4:31 ` [Patch 15/16] Vlv2TbltDevicePkg/Capsule: Add Linux/LVFS generation scripts Michael D Kinney
2019-05-09 7:55 ` Sun, Zailiang
2019-05-09 13:21 ` Qian, Yi
2019-05-09 4:31 ` [Patch 16/16] Vlv2TbltDevicePkg: Update Readme.md Michael D Kinney
2019-05-09 7:58 ` Sun, Zailiang
2019-05-09 13:21 ` Qian, Yi
2019-05-09 13:18 ` [Patch 00/16] Vlv2TbltDevicePkg: Sync with edk2/master Qian, Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7CB7EF03E15B5D48981329A508747A9850C62EA4@SHSMSX104.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox