diff options
author | Lu, ShifeiX A <shifeix.a.lu@intel.com> | 2017-09-14 13:59:07 +0800 |
---|---|---|
committer | zwei4 <david.wei@intel.com> | 2017-09-14 14:24:54 +0800 |
commit | 6cd1979741110bc949153e1f019bbff33e040fed (patch) | |
tree | 185653158a8ff0ee225b5b7a07241b90d69dbdbc /Platform/BroxtonPlatformPkg/BuildBios.sh | |
parent | d0985c22d5c2c7e24fcf82f8bd77dad44eb342b8 (diff) | |
download | edk2-platforms-6cd1979741110bc949153e1f019bbff33e040fed.tar.xz |
Build Script.
Change build script to generate different BIOS ID to differentiate Minnow3 and Benson Glacier board.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex <shifeix.a.lu@intel.com>
Diffstat (limited to 'Platform/BroxtonPlatformPkg/BuildBios.sh')
-rw-r--r-- | Platform/BroxtonPlatformPkg/BuildBios.sh | 67 |
1 files changed, 46 insertions, 21 deletions
diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPlatformPkg/BuildBios.sh index 3fa450b607..91f84a1e36 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.sh +++ b/Platform/BroxtonPlatformPkg/BuildBios.sh @@ -29,6 +29,7 @@ SV_String=_ exitCode=0 Arch=X64 FabId=B +BoardId=MN ## Initialize all the build flags to FALSE ## depending on the cmd line input, some will be set to TRUE prior to building @@ -97,6 +98,9 @@ for (( i=1; i<=$#; )) if [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/X64" ]; then Arch=X64 shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/BG" ]; then + BoardId=BG + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" == "/B" ]; then FabId=B shift @@ -119,12 +123,16 @@ fi ## Remove the values for Platform_Type and Build_Target from BiosId.env and stage in Conf/ cp $WORKSPACE/$PLATFORM_PACKAGE/BiosId.env $WORKSPACE/Conf/BiosId.env sed -i '/^BOARD_ID/d' $WORKSPACE/Conf/BiosId.env +sed -i '/^BOARD_REV/d' $WORKSPACE/Conf/BiosId.env sed -i '/^BUILD_TYPE/d' $WORKSPACE/Conf/BiosId.env -sed -i '/^VERSION_MINOR/d' $WORKSPACE/Conf/BiosId.env - -BOARD_ID=MNW3 -echo BOARD_ID = MINNOWV >> $WORKSPACE/Conf/BiosId.env +if [ $BoardId == "MN" ]; then + BOARD_ID=MNW3 + echo BOARD_ID = MINNOW3 >> $WORKSPACE/Conf/BiosId.env +else + BOARD_ID=BEN1 + echo BOARD_ID = BENSONV >> $WORKSPACE/Conf/BiosId.env +fi ENBDT_PF_BUILD=TRUE PLATFORM_NAME=BroxtonPlatformPkg PLATFORM_PACKAGE=Platform/BroxtonPlatformPkg @@ -164,14 +172,22 @@ else echo BUILD_TYPE = D >> $WORKSPACE/Conf/BiosId.env fi -if [ $FabId == "B" ]; then - VERSION_MINOR=0B - echo VERSION_MINOR = 0B >> $WORKSPACE/Conf/BiosId.env -else - VERSION_MINOR=0A - echo VERSION_MINOR = 0A >> $WORKSPACE/Conf/BiosId.env +if [ $BoardId == "BG" ]; then + BOARD_REV=A + echo BOARD_REV = A >> $WORKSPACE/Conf/BiosId.env fi +if [ $BoardId == "MN" ]; then + if [ $FabId == "B" ]; then + BOARD_REV=B + echo BOARD_REV = B >> $WORKSPACE/Conf/BiosId.env + else + BOARD_REV=A + echo BOARD_REV = A >> $WORKSPACE/Conf/BiosId.env + fi +fi + + ##********************************************************************** ## Additional EDK Build Setup/Configuration ##********************************************************************** @@ -262,7 +278,7 @@ cp $BUILD_PATH/FV/SOC.fd $BUILD_PATH/FV/Bxt"$Arch".fd ## VERSION_MAJOR=$(grep '^VERSION_MAJOR' Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1-4) VERSION_MINOR=$(grep '^VERSION_MINOR' Conf/BiosId.env | cut -d ' ' -f 3 | cut -c 1-2) -BIOS_Name="$BOARD_ID""$SV_String""$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MINOR" +BIOS_Name="$BOARD_ID""$BOARD_REV""$SV_String""$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_"$VERSION_MINOR" cp -f $BUILD_PATH/FV/FVOBB.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch cp -f $BUILD_PATH/FV/FVOBBX.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch @@ -270,16 +286,25 @@ cp -f $BUILD_PATH/FV/FVIBBR.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too 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 -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 +if [ $BoardId == "BG" ]; then + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/BensonGlacier/FAB_A/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/BensonGlacier/FAB_A/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/BensonGlacier/FAB_A/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/BensonGlacier/FAB_A/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +fi + +if [ $BoardId == "MN" ]; then + 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 fi # |