diff options
author | Tim He <tim.he@intel.com> | 2015-11-12 08:33:12 +0000 |
---|---|---|
committer | timhe <timhe@Edk2> | 2015-11-12 08:33:12 +0000 |
commit | 83586b5d50f10a57d02233c066a92cb88718f5a1 (patch) | |
tree | 6c5eb22c131dc62e59ca9f5b6e75cf25027b5bc4 /Vlv2TbltDevicePkg | |
parent | 0ce8410ed7f1a1537707e87198cfc2460ec1fecb (diff) | |
download | edk2-platforms-83586b5d50f10a57d02233c066a92cb88718f5a1.tar.xz |
Vlv2TbltDevicePkg: Sync the branch changes to Trunk,
Add 'yL' build option to enable SPI lock for MinnowBoard Max.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tim He <tim.he@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18777 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Vlv2TbltDevicePkg')
-rw-r--r-- | Vlv2TbltDevicePkg/Build_IFWI.bat | 15 | ||||
-rwxr-xr-x | Vlv2TbltDevicePkg/Build_IFWI.sh | 6 | ||||
-rw-r--r-- | Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin | bin | 253952 -> 253952 bytes | |||
-rw-r--r-- | Vlv2TbltDevicePkg/Stitch/IFWIHeader/IFWI_HEADER_SPILOCK.bin | bin | 0 -> 4096 bytes | |||
-rw-r--r-- | Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat | 17 | ||||
-rwxr-xr-x | Vlv2TbltDevicePkg/bld_vlv.sh | 13 |
6 files changed, 40 insertions, 11 deletions
diff --git a/Vlv2TbltDevicePkg/Build_IFWI.bat b/Vlv2TbltDevicePkg/Build_IFWI.bat index a07a826df0..e33a3bd172 100644 --- a/Vlv2TbltDevicePkg/Build_IFWI.bat +++ b/Vlv2TbltDevicePkg/Build_IFWI.bat @@ -86,6 +86,12 @@ if /i "%~1"=="/nB" ( shift
goto OptLoop
)
+if /i "%~1"=="/yL" (
+ set Stitch_Flags=%Stitch_Flags% /yL
+ shift
+ goto OptLoop
+)
+
:: Require 2 input parameters
if "%~2"=="" goto Usage
@@ -93,6 +99,7 @@ if "%~2"=="" goto Usage :: Assign required arguments
set Platform_Type=%~1
set Build_Target=%~2
+
if "%~3"=="" (
set "IFWI_Suffix= "
) else set "IFWI_Suffix=/S %~3"
@@ -151,16 +158,10 @@ echo Script to build BIOS firmware and stitch the entire IFWI. echo.
echo Usage: Build_IFWI.bat [options] PlatformType BuildTarget [IFWI Suffix]
echo.
-echo /q Quiet mode. Only display Fatal Errors (slightly faster)
-echo /l Log a copy of the build output to EDK2.log
echo /c CleanAll before building
-echo /ecp ECP build enable
-echo /src Build silicon source code (default binary)
echo /x64 Set Arch to X64 (default: X64)
echo /IA32 Set Arch to IA32 (default: X64)
-echo /nG Do NOT update the GOP driver when stitching (ie keep src version)
-echo /nM Do NOT update the Microcode when stitching (ie keep src version)
-echo /nB Do NOT create a backup of BIOS.ROM before modifying it for Stitch
+echo /yL Enable SPI lock
echo.
echo Platform Types: MNW2
echo Build Targets: Release, Debug
diff --git a/Vlv2TbltDevicePkg/Build_IFWI.sh b/Vlv2TbltDevicePkg/Build_IFWI.sh index f5e499c2d2..4a11a1cba9 100755 --- a/Vlv2TbltDevicePkg/Build_IFWI.sh +++ b/Vlv2TbltDevicePkg/Build_IFWI.sh @@ -6,9 +6,10 @@ function Usage ( ) { echo echo "Script to build BIOS firmware and stitch the entire IFWI." echo - echo "Usage: Build_IFWI.bat PlatformType BuildTarget " + echo "Usage: Build_IFWI.bat [options] PlatformType BuildTarget " echo echo + echo " /yL [option] : Enable SPI lock" echo " Platform Types: MNW2" echo " Build Targets: Release, Debug" echo @@ -60,6 +61,9 @@ for (( i=1; i<=$#; )) elif [ "$1" == "/nV" ]; then Stitch_Flags="$Stitch_Flags /nV" shift + elif [ "$1" == "/yL" ]; then + Build_Flags="$Build_Flags /yL" + shift else break fi diff --git a/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin b/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin Binary files differindex 0882391d7d..6aa2bb5aa5 100644 --- a/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin +++ b/Vlv2TbltDevicePkg/Stitch/Gcc/NvStorageVariable.bin diff --git a/Vlv2TbltDevicePkg/Stitch/IFWIHeader/IFWI_HEADER_SPILOCK.bin b/Vlv2TbltDevicePkg/Stitch/IFWIHeader/IFWI_HEADER_SPILOCK.bin Binary files differnew file mode 100644 index 0000000000..f32b1df394 --- /dev/null +++ b/Vlv2TbltDevicePkg/Stitch/IFWIHeader/IFWI_HEADER_SPILOCK.bin diff --git a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat index a512e42676..f3a9cf3d74 100644 --- a/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat +++ b/Vlv2TbltDevicePkg/Stitch/IFWIStitch.bat @@ -19,6 +19,7 @@ SetLocal EnableDelayedExpansion EnableExtensions set exitCode=0
set BackupRom=1
set UpdateVBios=1
+set SpiLock=0
set Stitch_Config=Stitch_Config.txt
copy /y nul Stitching.log >nul
@@ -47,6 +48,12 @@ if /i "%~1"=="/nB" ( shift
goto OptLoop
)
+if /i "%~1"=="/yL" (
+ set SpiLock=1
+ shift
+ goto OptLoop
+)
+
if /i "%~1"=="/B" (
if "%~2"=="" goto Usage
if not exist %~2 echo BIOS not found. & goto Usage
@@ -103,6 +110,11 @@ for /f "delims== tokens=1,2" %%i in (%Stitch_Config%) do ( )
)
+if %SpiLock% EQU 1 (
+ set IFWI_HEADER_FILE=IFWIHeader\!IFWI_HEADER!_SPILOCK.bin
+) else (
+ set IFWI_HEADER_FILE=IFWIHeader\!IFWI_HEADER!.bin
+)
:: **********************************************************************
:: The Main Stitching Loop
@@ -168,7 +180,7 @@ for %%i in (%BIOS_Names%) do ( echo.
echo Stitching IFWI for !BIOS_Rom! ...
echo ---------------------------------------------------------------------------
- echo IFWI Header: !IFWI_HEADER!.bin, SEC version: !SEC_VERSION!,
+ echo IFWI Header: !IFWI_HEADER_FILE!, SEC version: !SEC_VERSION!,
echo BIOS Version: !BIOS_Version!
echo Platform Type: !Platform_Type!, IFWI Prefix: %BIOS_ID%
@@ -178,7 +190,8 @@ for %%i in (%BIOS_Names%) do ( echo.
echo Generating IFWI... %BIOS_ID%.bin
echo.
- copy /b/y IFWIHeader\!IFWI_HEADER!.bin + ..\..\Vlv2MiscBinariesPkg\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin + IFWIHeader\Vacant.bin + !BIOS_Rom! %BIOS_ID%.bin
+
+ copy /b/y !IFWI_HEADER_FILE! + ..\..\Vlv2MiscBinariesPkg\SEC\!SEC_VERSION!\VLV_SEC_REGION.bin + ..\..\Vlv2MiscBinariesPkg\SEC\!SEC_VERSION!\Vacant.bin + !BIOS_Rom! %BIOS_ID%.bin
echo.
echo ===========================================================================
)
diff --git a/Vlv2TbltDevicePkg/bld_vlv.sh b/Vlv2TbltDevicePkg/bld_vlv.sh index ade96dbd74..5b2ea3fa0f 100755 --- a/Vlv2TbltDevicePkg/bld_vlv.sh +++ b/Vlv2TbltDevicePkg/bld_vlv.sh @@ -29,6 +29,7 @@ echo -e $(date) Build_Flags= exitCode=0 Arch=X64 +SpiLock=0 ## Clean up previous build files. if [ -e $(pwd)/EDK2.log ]; then @@ -104,6 +105,9 @@ for (( i=1; i<=$#; )) elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then Arch=X64 shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/YL" ]; then + SpiLock=1 + shift else break fi @@ -206,6 +210,13 @@ fi echo "Invoking EDK2 build..." build +if [ $SpiLock == "1" ]; then + IFWI_HEADER_FILE=./$PLATFORM_PACKAGE/Stitch/IFWIHeader/IFWI_HEADER_SPILOCK.bin +else + IFWI_HEADER_FILE=./$PLATFORM_PACKAGE/Stitch/IFWIHeader/IFWI_HEADER.bin +fi + +echo $IFWI_HEADER_FILE ##********************************************************************** ## Post Build processing and cleanup @@ -223,7 +234,7 @@ BIOS_Name="$BOARD_ID"_"$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MINOR".RO 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.1067 -cat ./$PLATFORM_PACKAGE/Stitch/IFWIHeader/IFWI_HEADER.bin ./Vlv2MiscBinariesPkg/SEC/$SEC_VERSION/VLV_SEC_REGION.bin ./$PLATFORM_PACKAGE/Stitch/IFWIHeader/Vacant.bin $BIOS_Name > ./$PLATFORM_PACKAGE/Stitch/$BIOS_ID +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 echo Skip "Running BIOS_Signing ..." |