diff options
author | Guo Mang <mang.guo@intel.com> | 2016-12-23 13:15:45 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-05-09 13:02:57 +0800 |
commit | 64540be64d757e4ada46f79e6a5d0617470d26f9 (patch) | |
tree | c4b1f6eb4bc84f14f18888050aab6a6c42493dc1 /Platform/BroxtonPlatformPkg/BuildIFWI.sh | |
parent | 675f006d8a881f11dd2fb0c9acadd3bcf9e865d9 (diff) | |
download | edk2-platforms-64540be64d757e4ada46f79e6a5d0617470d26f9.tar.xz |
BroxtonPlatformPkg: Add BroxtonPlatformPkg dsc, fdf and script files
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'Platform/BroxtonPlatformPkg/BuildIFWI.sh')
-rw-r--r-- | Platform/BroxtonPlatformPkg/BuildIFWI.sh | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPlatformPkg/BuildIFWI.sh new file mode 100644 index 0000000000..98b5b7141a --- /dev/null +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh @@ -0,0 +1,161 @@ +##********************************************************************** +## Function define +##********************************************************************** +function Usage() { + echo + echo "Script to build BIOS firmware and stitch the entire IFWI." + echo + echo "Usage: BuildIFWI.bat [options] ^<PlatformType^> ^<BuildTarget^> [IFWI Suffix]" + echo + echo " /? Display this help text " + 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 " /w Enabled WinDbg module for build " + echo " /sv Build with SVBIOS flags enabled " + echo " /ppv Build with PPV flags enabled " + echo " /rvv Build with RVV BXTM flags enabled " + echo " /rvvp Build with RVVP BXTP flags enabled " + echo " /x64 Set Arch to X64 (default: IA32) " + echo " /sata Enable SATA Build " + echo " /pcie Enable PCIe Build " + echo " /nG Not update GOP driver per StitchConfig (override src version) " + echo " /uM Update Microcode per StitchConfig (override src version) " + echo + echo " Set ONLY ONE of the following: " + echo " /vp Set special build flag for ALL Pre-Si " + echo " /csle Set special build flag for C-SLE " + echo + echo " Platform Types: $eNB_RVP $Phblt_RVP $Phblt_Die1_RVP $Embd_RVP " + echo " APLK - Netbook/Desktop " + echo " BXTM - Phablet build for BXT-A " + echo " BXTM1 - Phablet build for BXT Die1(E0) " + echo " APLI - Embedded/IVI build (IOTG) " + echo + echo " Build Targets: Release, Debug " + echo " IFWI Suffix: Suffix to append to end of IFWI filename (default: MM_DD_YYYY) " + echo + echo " See Stitch/Stitch_Config.txt for additional stitching settings. " + echo + echo "Press any key......" + read + exit 0 +} + + +## Assign initial values +exitCode=0 +Build_Flags= +Stitch_Flags= +Arch=IA32 + +## Description of each Platform/Board_ID +## APLK - Netbook/Desktop (PCCG) +## BXTM - Phablet build (MCG) +## BXTM1 - Phablet build for BXT Die1(E0) (MCG) +## APLI - Embedded/IVI build (IOTG) +eNB_RVP=APLK +Phblt_RVP=BXTM +Phblt_Die1_RVP=BXTM1 +Embd_RVP=APLI + +## Parse Optional arguments +if [ "$1" == "/?" ]; then + Usage +fi + +## Build Flags +for (( i=1; i<=$#; )) + do + if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/Q" ]; then + Build_Flags="$Build_Flags /q" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/L" ]; then + Build_Flags="$Build_Flags /l" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/C" ]; then + Build_Flags="$Build_Flags /c" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/W" ]; then + Build_Flags="$Build_Flags /w" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/SV" ]; then + Build_Flags="$Build_Flags /sv" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/PPV" ]; then + Build_Flags="$Build_Flags /ppv" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVVP" ]; then + Build_Flags="$Build_Flags /rvvp" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/RVV" ]; then + Build_Flags="$Build_Flags /rvv" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then + Arch=X64 + Build_Flags="$Build_Flags /x64" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/VP" ]; then + Build_Flags="$Build_Flags /vp" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/CSLE" ]; then + Build_Flags="$Build_Flags /csle" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/SATA" ]; then + Build_Flags="$Build_Flags /sata" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/PCIE" ]; then + Build_Flags="$Build_Flags /pcie" + shift + else + break + fi + done + +## Stitch Flags +for (( i=1; i<=$#; )) + do + if [ "$1" == "/nG" ]; then + Stitch_Flags="$Stitch_Flags /nG" + shift + elif [ "$1" == "/uM" ]; then + Stitch_Flags="$Stitch_Flags /uM" + shift + elif [ "$1" == "/nB" ]; then + Stitch_Flags="$Stitch_Flags /nB" + shift + else + break + fi + done + +## Require 2 input parameters +if [ "$2" == "" ]; then + echo "Not Enough Arguments Provided" + echo "Please review the Help screen "/?"" +fi + +## Assign required arguments +Platform_Type=$1 +Build_Target=$2 +if [ "$3" == "" ]; then + IFWI_Suffix= +else + IFWI_Suffix="/S $3" +fi + +# Go to root directory of work space. +cd .. +cd .. + +## Build BIOS +echo "======================================================================" +echo "Build_IFWI: Calling BIOS build Script..." +./Platform/BroxtonPlatformPkg/BuildBios.sh $Build_Flags $Platform_Type $Build_Target + +echo +echo Finished Building BIOS. + +## Start Integration process +echo ====================================================================== +echo Skip "Build_IFWI: Calling IFWI Stitching Script..." |