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>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Yi Qian <yi.qian@intel.com>
This commit is contained in:
Michael D Kinney 2019-05-08 15:23:13 -07:00
parent ef81f9f12a
commit 9d87197eda
6 changed files with 123 additions and 278 deletions

View File

@ -1,3 +1,5 @@
AutoPlatformCFG.txt
Stitch/Stitching.log
Stitch/MNW*.bin
Stitch/MNW*.rom
Stitch/MNW*.rom.orig

View File

@ -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

View File

@ -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 ===========================================================================
)

View File

@ -1,215 +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\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.txt
@echo ACTIVE_PLATFORM = %PLATFORM_PACKAGE%/PlatformPkgX64.dsc >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
@echo TARGET = %TARGET% >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
@echo TARGET_ARCH = IA32 X64 >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
@echo TOOL_CHAIN_TAG = %TOOL_CHAIN_TAG% >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
@echo BUILD_RULE_CONF = Conf/build_rule.txt >> Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt
@move /Y Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\target.txt 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\BiosId.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\VlvX64.beforeconfig.fd 1>>EDK2.log 2>&1
del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt 1>>EDK2.log 2>&1
copy /y Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.fd Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd 1>>EDK2.log 2>&1
@echo.
@echo Extract setup default value from VFR (Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.txt)
@echo.
fce read -i Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.beforeconfig.fd > Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\HiiDefaultData.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\VlvX64.beforeconfig.fd -o Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\VlvX64.fd Setup SetupDefault 1>>EDK2.log 2>&1
@echo off
del Build\%PLATFORM_PACKAGE%\%TARGET%_%TOOL_CHAIN_TAG%\FV\Vlv.fd
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\VlvX64.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

View File

@ -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,24 +15,59 @@ 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 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\.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
@ -40,8 +75,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
@ -81,9 +114,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
@ -106,17 +139,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 (
@ -127,10 +160,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
)
::**********************************************************************
@ -180,43 +213,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
@ -234,23 +264,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_PATH%\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_PATH%\%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%
@ -260,13 +290,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

View File

@ -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"_"$VERSION_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_REGION.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 ..."