BuildBIOS.bat | 14 +++++----- BuildBIOS.sh | 31 +++++++++++++++++++++- Platform/BroxtonPlatformPkg/BuildBios.bat | 15 +++-------- Platform/BroxtonPlatformPkg/BuildBios.sh | 23 ++++++++++++---- Platform/BroxtonPlatformPkg/BuildIFWI.bat | 10 +++---- Platform/BroxtonPlatformPkg/BuildIFWI.sh | 9 +++++++ .../Common/Tools/Stitch/IFWIStitch_Simple.bat | 22 +++++++-------- 7 files changed, 83 insertions(+), 41 deletions(-)
Change build script to differentiate FAB A and FAB B Board.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
---
BuildBIOS.bat | 14 +++++-----
BuildBIOS.sh | 31 +++++++++++++++++++++-
Platform/BroxtonPlatformPkg/BuildBios.bat | 15 +++--------
Platform/BroxtonPlatformPkg/BuildBios.sh | 23 ++++++++++++----
Platform/BroxtonPlatformPkg/BuildIFWI.bat | 10 +++----
Platform/BroxtonPlatformPkg/BuildIFWI.sh | 9 +++++++
.../Common/Tools/Stitch/IFWIStitch_Simple.bat | 22 +++++++--------
7 files changed, 83 insertions(+), 41 deletions(-)
diff --git a/BuildBIOS.bat b/BuildBIOS.bat
index 51ed30b..3bc68e5 100644
--- a/BuildBIOS.bat
+++ b/BuildBIOS.bat
@@ -10,7 +10,7 @@ set PlatformName=
set BuildTarget=Debug
set Compiler=/vs13
set Arch=/x64
-set Stepping=/B
+set FabId=/B
:: Optional arguments
:OptLoop
@@ -61,13 +61,13 @@ if /i "%~1"=="/vs15" (
goto OptLoop
)
if /i "%~1"=="/A" (
- set Stepping=/A
+ set FabId=/A
echo.
shift
goto OptLoop
)
if /i "%~1"=="/B" (
- set Stepping=/B
+ set FabId=/B
echo.
shift
goto OptLoop
@@ -83,8 +83,8 @@ set BuildTarget=%~2
:OptLoopEnd
echo ---- Call Build Script of Broxton ----
-echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %Stepping% /fspw %BuildFlags% MINN %BuildTarget%
-call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %Stepping% /fspw %BuildFlags% MINN %BuildTarget%
+echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %FabId% /fspw %BuildFlags% MINN %BuildTarget%
+call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %FabId% /fspw %BuildFlags% MINN %BuildTarget%
goto Exit
@@ -97,8 +97,8 @@ echo.
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)
-echo /A Set stepping to A (default: B stepping)
-echo /B Set stepping to B (default: B stepping)
+echo /A Set FabId to A (default: FAB_B)
+echo /B Set FabId to B (default: FAB_B)
echo PlatformName: Broxton
echo BuildTargets: Release, Debug
diff --git a/BuildBIOS.sh b/BuildBIOS.sh
index fb67f04..c241d87 100755
--- a/BuildBIOS.sh
+++ b/BuildBIOS.sh
@@ -8,6 +8,34 @@
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
+
+##**********************************************************************
+## Initial Setup
+##**********************************************************************
+
+Build_Flags=
+
+## Parse Optional arguments
+if [ "$1" == "/?" ]; then
+ Usage
+fi
+
+## Build Flags
+for (( i=1; i<=$#; ))
+ do
+ if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then
+ FabId=B
+ Build_Flags="$Build_Flags /B"
+ shift
+ elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/A" ]; then
+ FabId=A
+ Build_Flags="$Build_Flags /A"
+ shift
+ else
+ break
+ fi
+ done
+
Target_Flag=Release
if [ "$1" == "Debug" ]; then
Target_Flag=Debug
@@ -18,6 +46,7 @@ if [ "$1" == "Release" ]; then
shift
fi
+echo $Build_Flags
echo $Target_Flag
export WORKSPACE=`pwd`
@@ -27,5 +56,5 @@ export PACKAGES_PATH=$WORKSPACE:$WORKSPACE/Core:$WORKSPACE/Silicon/:$WORKSPACE/P
make -C BaseTools
-bash ./Platform/BroxtonPlatformPkg/BuildIFWI.sh APLI $Target_Flag
+bash ./Platform/BroxtonPlatformPkg/BuildIFWI.sh $Build_Flags APLI $Target_Flag
diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPlatformPkg/BuildBios.bat
index 80de2f4..5e06a98 100644
--- a/Platform/BroxtonPlatformPkg/BuildBios.bat
+++ b/Platform/BroxtonPlatformPkg/BuildBios.bat
@@ -24,7 +24,7 @@ set "Build_Flags= "
set exitCode=0
set Arch=X64
set Compiler=VS2013
-set Stepping=B
+set FabId=B
if not defined BiosVersion set BiosVersion=DEV
@@ -154,13 +154,13 @@ if /i "%~1"=="/FspW" (
goto OptLoop
)
if /i "%~1"=="/A" (
- set Stepping=A
+ set FabId=A
echo.
shift
goto OptLoop
)
if /i "%~1"=="/B" (
- set Stepping=B
+ set FabId=B
echo.
shift
goto OptLoop
@@ -409,7 +409,6 @@ 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%" == "TRUE" (
- if %Stepping%==B (
:: 0xFEF7A000 = gIntelFsp2WrapperTokenSpaceGuid.PcdFlashFvFspBase = $(CAR_BASE_ADDRESS) + $(BLD_RAM_DATA_SIZE) + $(FSP_RAM_DATA_SIZE) + $(FSP_EMP_DATA_SIZE) + $(BLD_IBBM_SIZE)
pushd %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin
python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py rebase -f ApolloLakeFsp.fd -c m -b 0xFEF7A000 -o .\ -n FSP.fd
@@ -418,14 +417,6 @@ if /i "%FSP_WRAPPER%" == "TRUE" (
copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin\FSP_T.Fv %Storage_Folder%\FSP_T.Fv
copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin\FSP_M.Fv %Storage_Folder%\FSP_M.Fv
copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin\FSP_S.Fv %Storage_Folder%\FSP_S.Fv
- ) else (
- pushd %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP
- python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py split -f FSP.fd -o .\ -n FSP.Fv
- popd
- copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP\FSP_T.Fv %Storage_Folder%\FSP_T.Fv
- copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP\FSP_M.Fv %Storage_Folder%\FSP_M.Fv
- copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP\FSP_S.Fv %Storage_Folder%\FSP_S.Fv
- )
)
echo Get NvStorage Base and Size...
diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPlatformPkg/BuildBios.sh
index fb6ac67..a1f4766 100644
--- a/Platform/BroxtonPlatformPkg/BuildBios.sh
+++ b/Platform/BroxtonPlatformPkg/BuildBios.sh
@@ -28,6 +28,7 @@ Build_Flags=
SV_String=_
exitCode=0
Arch=X64
+FabId=B
## Initialize all the build flags to FALSE
## depending on the cmd line input, some will be set to TRUE prior to building
@@ -129,6 +130,12 @@ 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')" == "/B" ]; then
+ FabId=B
+ shift
+ elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/A" ]; then
+ FabId=A
+ shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then
VP_BIOS_ENABLE=TRUE
shift
@@ -294,12 +301,18 @@ cp -f $BUILD_PATH/FV/FVOBBX.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too
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
-cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
-
+if [ $FabId == "B" ]; then
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+else
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch
+fi
#
# Assmeble components
diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
index e8e1c4f..9c645a7 100644
--- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat
+++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat
@@ -6,7 +6,7 @@ set exitCode=0
set "Build_Flags= "
set Arch=X64
set SkipUsageFlag=FALSE
-set Stepping=B
+set FabId=B
set WORKSPACE=%CD%
if %WORKSPACE:~-1%==\ (
set WORKSPACE=%WORKSPACE:~0,-1%
@@ -79,13 +79,13 @@ if /i "%~1"=="/FspW" (
goto OptLoop
)
if /i "%~1"=="/A" (
- set Stepping=A
+ set FabId=A
set Build_Flags=%Build_Flags% /A
shift
goto OptLoop
)
if /i "%~1"=="/B" (
- set Stepping=B
+ set FabId=B
set Build_Flags=%Build_Flags% /B
shift
goto OptLoop
@@ -139,8 +139,8 @@ echo.
echo BIOS ROM input: %BIOS_Name%
echo.
pushd %STITCH_PATH%
- echo - call IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %Stepping%
- call %STITCH_PATH%\IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %Stepping%
+ echo - call IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %FabId%
+ call %STITCH_PATH%\IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %FabId%
@echo off
popd
if ErrorLevel 1 (
diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
index c21904f..69ed67a 100755
--- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh
+++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh
@@ -60,6 +60,7 @@ exitCode=0
Build_Flags=
Stitch_Flags=
Arch=IA32
+FabId=B
## Description of each Platform/Board_ID
## APLK - Netbook/Desktop (PCCG)
@@ -107,6 +108,14 @@ for (( i=1; i<=$#; ))
Arch=X64
Build_Flags="$Build_Flags /x64"
shift
+ elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then
+ FabId=B
+ Build_Flags="$Build_Flags /B"
+ shift
+ elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/A" ]; then
+ FabId=A
+ Build_Flags="$Build_Flags /A"
+ shift
elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then
Build_Flags="$Build_Flags /vp"
shift
diff --git a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat
index 326fade..c3bb2bd 100644
--- a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat
+++ b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat
@@ -29,14 +29,14 @@ if "%~1"=="/?" goto Usage
if /i "%~1"=="Help" goto Usage
set FspWrapper=FALSE
-set Stepping=B
+set FabId=B
if /i "%~2"=="B" (
- set Stepping=B
+ set FabId=B
)
if /i "%~2"=="A" (
- set Stepping=A
+ set FabId=A
)
:OptLoop1
@@ -119,16 +119,16 @@ copy /y /b %BIOS_Names%\IBBL.Fv .\BIOS_COMPONENTS
copy /y /b %BIOS_Names%\IBB.Fv .\BIOS_COMPONENTS
copy /y /b %BIOS_Names%\OBB.Fv .\BIOS_COMPONENTS
copy /y /b %BIOS_Names%\NvStorage.Fv .\BIOS_COMPONENTS
-if %Stepping%==B (
- copy /y /b ..\..\Binaries\IFWI\B_Stepping\SpiChunk1.bin .
- copy /y /b ..\..\Binaries\IFWI\B_Stepping\SpiChunk2.bin .
- copy /y /b ..\..\Binaries\IFWI\B_Stepping\SpiChunk3.bin .
+if %FabId%==B (
+ copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_B\SpiChunk1.bin .
+ copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_B\SpiChunk2.bin .
+ copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_B\SpiChunk3.bin .
copy /y /b SpiChunk1.bin+.\BIOS_COMPONENTS\IBBL.Fv+.\BIOS_COMPONENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvStorage.Fv+SpiChunk3.bin spi_out.bin
) else (
- copy /y /b ..\..\Binaries\IFWI\A_Stepping\SpiChunk1.bin .
- copy /y /b ..\..\Binaries\IFWI\A_Stepping\SpiChunk2.bin .
- copy /y /b ..\..\Binaries\IFWI\A_Stepping\SpiChunk3.bin .
- copy /y /b SpiChunk1.bin+.\BIOS_COMPONENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvStorage.Fv+SpiChunk3.bin spi_out.bin
+ copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_A\SpiChunk1.bin .
+ copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_A\SpiChunk2.bin .
+ copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_A\SpiChunk3.bin .
+ copy /y /b SpiChunk1.bin+.\BIOS_COMPONENTS\IBBL.Fv+.\BIOS_COMPONENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvStorage.Fv+SpiChunk3.bin spi_out.bin
)
move /y spi_out.bin %BIOS_ID%.bin >> Stitching.log
--
2.7.0.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: zwei4 <david.wei@intel.com> Thanks, David Wei -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of lushifex Sent: Thursday, June 08, 2017 3:58 PM To: edk2-devel@lists.01.org Cc: Wei, David <david.wei@intel.com> Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build script. Change build script to differentiate FAB A and FAB B Board. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex <shifeix.a.lu@intel.com> --- BuildBIOS.bat | 14 +++++----- BuildBIOS.sh | 31 +++++++++++++++++++++- Platform/BroxtonPlatformPkg/BuildBios.bat | 15 +++-------- Platform/BroxtonPlatformPkg/BuildBios.sh | 23 ++++++++++++---- Platform/BroxtonPlatformPkg/BuildIFWI.bat | 10 +++---- Platform/BroxtonPlatformPkg/BuildIFWI.sh | 9 +++++++ .../Common/Tools/Stitch/IFWIStitch_Simple.bat | 22 +++++++-------- 7 files changed, 83 insertions(+), 41 deletions(-) diff --git a/BuildBIOS.bat b/BuildBIOS.bat index 51ed30b..3bc68e5 100644 --- a/BuildBIOS.bat +++ b/BuildBIOS.bat @@ -10,7 +10,7 @@ set PlatformName= set BuildTarget=Debug set Compiler=/vs13 set Arch=/x64 -set Stepping=/B +set FabId=/B :: Optional arguments :OptLoop @@ -61,13 +61,13 @@ if /i "%~1"=="/vs15" ( goto OptLoop ) if /i "%~1"=="/A" ( - set Stepping=/A + set FabId=/A echo. shift goto OptLoop ) if /i "%~1"=="/B" ( - set Stepping=/B + set FabId=/B echo. shift goto OptLoop @@ -83,8 +83,8 @@ set BuildTarget=%~2 :OptLoopEnd echo ---- Call Build Script of Broxton ---- -echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %Stepping% /fspw %BuildFlags% MINN %BuildTarget% -call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %Stepping% /fspw %BuildFlags% MINN %BuildTarget% +echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %FabId% /fspw %BuildFlags% MINN %BuildTarget% +call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %FabId% /fspw %BuildFlags% MINN %BuildTarget% goto Exit @@ -97,8 +97,8 @@ echo. 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) -echo /A Set stepping to A (default: B stepping) -echo /B Set stepping to B (default: B stepping) +echo /A Set FabId to A (default: FAB_B) +echo /B Set FabId to B (default: FAB_B) echo PlatformName: Broxton echo BuildTargets: Release, Debug diff --git a/BuildBIOS.sh b/BuildBIOS.sh index fb67f04..c241d87 100755 --- a/BuildBIOS.sh +++ b/BuildBIOS.sh @@ -8,6 +8,34 @@ # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # + +##********************************************************************** +## Initial Setup +##********************************************************************** + +Build_Flags= + +## Parse Optional arguments +if [ "$1" == "/?" ]; then + Usage +fi + +## Build Flags +for (( i=1; i<=$#; )) + do + if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then + FabId=B + Build_Flags="$Build_Flags /B" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/A" ]; then + FabId=A + Build_Flags="$Build_Flags /A" + shift + else + break + fi + done + Target_Flag=Release if [ "$1" == "Debug" ]; then Target_Flag=Debug @@ -18,6 +46,7 @@ if [ "$1" == "Release" ]; then shift fi +echo $Build_Flags echo $Target_Flag export WORKSPACE=`pwd` @@ -27,5 +56,5 @@ export PACKAGES_PATH=$WORKSPACE:$WORKSPACE/Core:$WORKSPACE/Silicon/:$WORKSPACE/P make -C BaseTools -bash ./Platform/BroxtonPlatformPkg/BuildIFWI.sh APLI $Target_Flag +bash ./Platform/BroxtonPlatformPkg/BuildIFWI.sh $Build_Flags APLI $Target_Flag diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPlatformPkg/BuildBios.bat index 80de2f4..5e06a98 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBios.bat @@ -24,7 +24,7 @@ set "Build_Flags= " set exitCode=0 set Arch=X64 set Compiler=VS2013 -set Stepping=B +set FabId=B if not defined BiosVersion set BiosVersion=DEV @@ -154,13 +154,13 @@ if /i "%~1"=="/FspW" ( goto OptLoop ) if /i "%~1"=="/A" ( - set Stepping=A + set FabId=A echo. shift goto OptLoop ) if /i "%~1"=="/B" ( - set Stepping=B + set FabId=B echo. shift goto OptLoop @@ -409,7 +409,6 @@ 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%" == "TRUE" ( - if %Stepping%==B ( :: 0xFEF7A000 = gIntelFsp2WrapperTokenSpaceGuid.PcdFlashFvFspBase = $(CAR_BASE_ADDRESS) + $(BLD_RAM_DATA_SIZE) + $(FSP_RAM_DATA_SIZE) + $(FSP_EMP_DATA_SIZE) + $(BLD_IBBM_SIZE) pushd %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py rebase -f ApolloLakeFsp.fd -c m -b 0xFEF7A000 -o .\ -n FSP.fd @@ -418,14 +417,6 @@ if /i "%FSP_WRAPPER%" == "TRUE" ( copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin\FSP_T.Fv %Storage_Folder%\FSP_T.Fv copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin\FSP_M.Fv %Storage_Folder%\FSP_M.Fv copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPkg\FspBin\FSP_S.Fv %Storage_Folder%\FSP_S.Fv - ) else ( - pushd %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP - python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py split -f FSP.fd -o .\ -n FSP.Fv - popd - copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP\FSP_T.Fv %Storage_Folder%\FSP_T.Fv - copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP\FSP_M.Fv %Storage_Folder%\FSP_M.Fv - copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGold\FSP\FSP_S.Fv %Storage_Folder%\FSP_S.Fv - ) ) echo Get NvStorage Base and Size... diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPlatformPkg/BuildBios.sh index fb6ac67..a1f4766 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.sh +++ b/Platform/BroxtonPlatformPkg/BuildBios.sh @@ -28,6 +28,7 @@ Build_Flags= SV_String=_ exitCode=0 Arch=X64 +FabId=B ## Initialize all the build flags to FALSE ## depending on the cmd line input, some will be set to TRUE prior to building @@ -129,6 +130,12 @@ 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')" == "/B" ]; then + FabId=B + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/A" ]; then + FabId=A + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then VP_BIOS_ENABLE=TRUE shift @@ -294,12 +301,18 @@ cp -f $BUILD_PATH/FV/FVOBBX.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too 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 -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Stepping/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch - +if [ $FabId == "B" ]; then +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_B/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +else +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBoard3/FAB_A/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +fi # # Assmeble components diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat b/Platform/BroxtonPlatformPkg/BuildIFWI.bat index e8e1c4f..9c645a7 100644 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat @@ -6,7 +6,7 @@ set exitCode=0 set "Build_Flags= " set Arch=X64 set SkipUsageFlag=FALSE -set Stepping=B +set FabId=B set WORKSPACE=%CD% if %WORKSPACE:~-1%==\ ( set WORKSPACE=%WORKSPACE:~0,-1% @@ -79,13 +79,13 @@ if /i "%~1"=="/FspW" ( goto OptLoop ) if /i "%~1"=="/A" ( - set Stepping=A + set FabId=A set Build_Flags=%Build_Flags% /A shift goto OptLoop ) if /i "%~1"=="/B" ( - set Stepping=B + set FabId=B set Build_Flags=%Build_Flags% /B shift goto OptLoop @@ -139,8 +139,8 @@ echo. echo BIOS ROM input: %BIOS_Name% echo. pushd %STITCH_PATH% - echo - call IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %Stepping% - call %STITCH_PATH%\IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %Stepping% + echo - call IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %FabId% + call %STITCH_PATH%\IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %FabId% @echo off popd if ErrorLevel 1 ( diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPlatformPkg/BuildIFWI.sh index c21904f..69ed67a 100755 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh @@ -60,6 +60,7 @@ exitCode=0 Build_Flags= Stitch_Flags= Arch=IA32 +FabId=B ## Description of each Platform/Board_ID ## APLK - Netbook/Desktop (PCCG) @@ -107,6 +108,14 @@ for (( i=1; i<=$#; )) Arch=X64 Build_Flags="$Build_Flags /x64" shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then + FabId=B + Build_Flags="$Build_Flags /B" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/A" ]; then + FabId=A + Build_Flags="$Build_Flags /A" + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then Build_Flags="$Build_Flags /vp" shift diff --git a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat index 326fade..c3bb2bd 100644 --- a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat +++ b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat @@ -29,14 +29,14 @@ if "%~1"=="/?" goto Usage if /i "%~1"=="Help" goto Usage set FspWrapper=FALSE -set Stepping=B +set FabId=B if /i "%~2"=="B" ( - set Stepping=B + set FabId=B ) if /i "%~2"=="A" ( - set Stepping=A + set FabId=A ) :OptLoop1 @@ -119,16 +119,16 @@ copy /y /b %BIOS_Names%\IBBL.Fv .\BIOS_COMPONENTS copy /y /b %BIOS_Names%\IBB.Fv .\BIOS_COMPONENTS copy /y /b %BIOS_Names%\OBB.Fv .\BIOS_COMPONENTS copy /y /b %BIOS_Names%\NvStorage.Fv .\BIOS_COMPONENTS -if %Stepping%==B ( - copy /y /b ..\..\Binaries\IFWI\B_Stepping\SpiChunk1.bin . - copy /y /b ..\..\Binaries\IFWI\B_Stepping\SpiChunk2.bin . - copy /y /b ..\..\Binaries\IFWI\B_Stepping\SpiChunk3.bin . +if %FabId%==B ( + copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_B\SpiChunk1.bin . + copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_B\SpiChunk2.bin . + copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_B\SpiChunk3.bin . copy /y /b SpiChunk1.bin+.\BIOS_COMPONENTS\IBBL.Fv+.\BIOS_COMPONENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvStorage.Fv+SpiChunk3.bin spi_out.bin ) else ( - copy /y /b ..\..\Binaries\IFWI\A_Stepping\SpiChunk1.bin . - copy /y /b ..\..\Binaries\IFWI\A_Stepping\SpiChunk2.bin . - copy /y /b ..\..\Binaries\IFWI\A_Stepping\SpiChunk3.bin . - copy /y /b SpiChunk1.bin+.\BIOS_COMPONENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvStorage.Fv+SpiChunk3.bin spi_out.bin + copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_A\SpiChunk1.bin . + copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_A\SpiChunk2.bin . + copy /y /b ..\..\Binaries\IFWI\MinnowBoard3\FAB_A\SpiChunk3.bin . + copy /y /b SpiChunk1.bin+.\BIOS_COMPONENTS\IBBL.Fv+.\BIOS_COMPONENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvStorage.Fv+SpiChunk3.bin spi_out.bin ) move /y spi_out.bin %BIOS_ID%.bin >> Stitching.log -- 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.