From nobody Sun May 5 14:22:46 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1505368751441428.9915279762804; Wed, 13 Sep 2017 22:59:11 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6991121E11D12; Wed, 13 Sep 2017 22:56:11 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 46D7621DF8078 for ; Wed, 13 Sep 2017 22:56:10 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Sep 2017 22:59:08 -0700 Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.21]) by fmsmga006.fm.intel.com with SMTP; 13 Sep 2017 22:59:07 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,391,1500966000"; d="scan'208";a="151674413" Date: Thu, 14 Sep 2017 13:59:07 +0800 From: lushifex To: edk2-devel@lists.01.org Message-ID: X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Build Script. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: , david.wei@intel.com Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: zwei4 --- BuildBIOS.bat | 19 +++++- BuildBIOS.sh | 8 ++- Platform/BroxtonPlatformPkg/BuildBios.bat | 39 ++++++++++--- Platform/BroxtonPlatformPkg/BuildBios.sh | 67 +++++++++++++++---= ---- Platform/BroxtonPlatformPkg/BuildIFWI.bat | 20 +++++-- Platform/BroxtonPlatformPkg/BuildIFWI.sh | 5 ++ .../Common/Tools/Stitch/IFWIStitch_Simple.bat | 40 +++++++++---- 7 files changed, 151 insertions(+), 47 deletions(-) diff --git a/BuildBIOS.bat b/BuildBIOS.bat index 3bc68e5..4bb4b03 100644 --- a/BuildBIOS.bat +++ b/BuildBIOS.bat @@ -11,6 +11,7 @@ set BuildTarget=3DDebug set Compiler=3D/vs13 set Arch=3D/x64 set FabId=3D/B +set BoardId=3D/MN =20 :: Optional arguments :OptLoop @@ -72,6 +73,18 @@ if /i "%~1"=3D=3D"/B" ( shift goto OptLoop ) +if /i "%~1"=3D=3D"/MN" ( + set BoardId=3D/MN + echo. + shift + goto OptLoop +) +if /i "%~1"=3D=3D"/BG" ( + set BoardId=3D/BG + echo. + shift + goto OptLoop +) =20 :: Required argument(s) :: Require 2 input parameters @@ -83,8 +96,8 @@ set BuildTarget=3D%~2 =20 :OptLoopEnd echo ---- Call Build Script of Broxton ---- -echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler= % %Arch% %FabId% /fspw %BuildFlags% MINN %BuildTarget%=20 -call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %= FabId% /fspw %BuildFlags% MINN %BuildTarget%=20 +echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler= % %Arch% %BoardId% %FabId% /fspw %BuildFlags% MINN %BuildTarget%=20 +call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %= BoardId% %FabId% /fspw %BuildFlags% MINN %BuildTarget%=20 =20 goto Exit =20 @@ -99,6 +112,8 @@ echo /x64 Set Arch to X64 (default: X64) echo /IA32 Set Arch to IA32 (default: X64) echo /A Set FabId to A (default: FAB_B) echo /B Set FabId to B (default: FAB_B) +echo /MN Minnow3 Board (default: MN) +echo /BG Benson Glacier Board echo PlatformName: Broxton echo BuildTargets: Release, Debug =20 diff --git a/BuildBIOS.sh b/BuildBIOS.sh index 552cf2d..aea8daa 100755 --- a/BuildBIOS.sh +++ b/BuildBIOS.sh @@ -18,6 +18,8 @@ function Usage () { echo echo "Usage: BuildBIOS.sh Build_Flags [PlatformName] Target_Flag" echo + echo " Build_Flags: /MN Minnow3 Board (default:= MN)" + echo " Build_Flags: /BG Benson Glacier Board" echo " Build_Flags: /A Set FabId to A (default= : FAB_B)" echo " Build_Flags: /B Set FabId to B (default= : FAB_B)" echo " PlatformName [optional]: Broxton " =20 @@ -49,7 +51,11 @@ fi ## Build Flags for (( i=3D1; i<=3D$#; )) do - if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then + if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then + BoardId=3DBG + Build_Flags=3D"$Build_Flags /BG" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then FabId=3DB Build_Flags=3D"$Build_Flags /B" shift diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPl= atformPkg/BuildBios.bat index 7aca176..3ac411e 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBios.bat @@ -25,6 +25,7 @@ set exitCode=3D0 set Arch=3DX64 set Compiler=3DVS2013 set FabId=3DB +set BoardId=3DMN if not defined BiosVersion set BiosVersion=3DDEV =20 =20 @@ -165,6 +166,18 @@ if /i "%~1"=3D=3D"/B" ( shift goto OptLoop ) +if /i "%~1"=3D=3D"/MN" ( + set BoardId=3DMN + echo. + shift + goto OptLoop +) +if /i "%~1"=3D=3D"/BG" ( + set BoardId=3DBG + echo. + shift + goto OptLoop +) =20 :: Required argument(s) if "%~2"=3D=3D"" ( @@ -178,7 +191,11 @@ echo. & echo -- Setting compiler to %Compiler% -- & ec= ho. :: BOARD_ID needs to be exactly 7 characters (GenBiosId.exe limitation) echo Setting %1 platform configuration and BIOS ID... if /i "%~1" =3D=3D "%Minnow_RVP%" ( - set BOARD_ID=3DMINNOWV + if %BoardId%=3D=3DMN ( + set BOARD_ID=3DMINNOW3 + ) else if %BoardId%=3D=3DBG ( + set BOARD_ID=3DBENSONV + ) set ENBDT_PF_BUILD=3DTRUE set PLATFORM_NAME=3DBroxtonPlatformPkg set PLATFORM_PACKAGE=3D%PLATFORM_PATH% @@ -216,9 +233,9 @@ if "%Arch%"=3D=3D"IA32" ( ::Stage of copy of BiosId.env in Conf/ with Platform_Type and Build_Target= values removed =20 if "%Arch%"=3D=3D"X64" ( - findstr /b /v "BOARD_ID BUILD_TYPE VERSION_MINOR" %PLATFORM_PACKAGE%\B= iosId.env > Conf\BiosId.env + findstr /b /v "BOARD_ID BUILD_TYPE BOARD_REV" %PLATFORM_PACKAGE%\BiosI= d.env > Conf\BiosId.env ) else if "%Arch%"=3D=3D"IA32" ( - findstr /b /v "BOARD_ID BUILD_TYPE VERSION_MINOR BOARD_EXT" %PLATFORM_= PACKAGE%\BiosId.env > Conf\BiosId.env + findstr /b /v "BOARD_ID BUILD_TYPE BOARD_REV BOARD_EXT" %PLATFORM_PACK= AGE%\BiosId.env > Conf\BiosId.env echo BOARD_EXT =3D I32 >> Conf\BiosId.env ) =20 @@ -230,10 +247,16 @@ if /i "%~2" =3D=3D "RELEASE" ( echo BUILD_TYPE =3D D >> Conf\BiosId.env ) =20 -if %FabId%=3D=3DB ( - echo VERSION_MINOR =3D 0B >> Conf\BiosId.env -) else ( - echo VERSION_MINOR =3D 0A >> Conf\BiosId.env +if %BoardId%=3D=3DBG ( + echo BOARD_REV =3D A >> Conf\BiosId.env +) + +if %BoardId%=3D=3DMN ( + if %FabId%=3D=3DB ( + echo BOARD_REV =3D B >> Conf\BiosId.env + ) else ( + echo BOARD_REV =3D A >> Conf\BiosId.env + ) ) =20 :: Set the Build_Type, Version_Major, and Version_Minor environment variab= les @@ -405,7 +428,7 @@ if ErrorLevel 1 goto BldFail if "%BUILD_TYPE%"=3D=3D"R" set BUILD_TYPE=3DR =20 echo Copy BIOS... -set BIOS_Name=3D%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MI= NOR% +set BIOS_Name=3D%BOARD_ID%%BOARD_REV%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_= %VERSION_MINOR% copy /y/b %BUILD_PATH%\FV\Soc.fd %STITCH_PATH%\%BIOS_Name%.ROM >n= ul copy /y %STITCH_PATH%\FlashMap.h %STITCH_PATH%\%BIOS_Name%.map >n= ul =20 diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPla= tformPkg/BuildBios.sh index 3fa450b..91f84a1 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.sh +++ b/Platform/BroxtonPlatformPkg/BuildBios.sh @@ -29,6 +29,7 @@ SV_String=3D_ exitCode=3D0 Arch=3DX64 FabId=3DB +BoardId=3DMN =20 ## Initialize all the build flags to FALSE ## depending on the cmd line input, some will be set to TRUE prior to buil= ding @@ -97,6 +98,9 @@ for (( i=3D1; i<=3D$#; )) if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/X64" ]; then Arch=3DX64 shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then + BoardId=3DBG + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then FabId=3DB shift @@ -119,12 +123,16 @@ fi ## Remove the values for Platform_Type and Build_Target from BiosId.env an= d 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 - =20 -BOARD_ID=3DMNW3 -echo BOARD_ID =3D MINNOWV >> $WORKSPACE/Conf/BiosId.env +if [ $BoardId =3D=3D "MN" ]; then + BOARD_ID=3DMNW3 + echo BOARD_ID =3D MINNOW3 >> $WORKSPACE/Conf/BiosId.env +else + BOARD_ID=3DBEN1 + echo BOARD_ID =3D BENSONV >> $WORKSPACE/Conf/BiosId.env +fi ENBDT_PF_BUILD=3DTRUE PLATFORM_NAME=3DBroxtonPlatformPkg PLATFORM_PACKAGE=3DPlatform/BroxtonPlatformPkg =20 @@ -164,14 +172,22 @@ else echo BUILD_TYPE =3D D >> $WORKSPACE/Conf/BiosId.env fi =20 -if [ $FabId =3D=3D "B" ]; then - VERSION_MINOR=3D0B - echo VERSION_MINOR =3D 0B >> $WORKSPACE/Conf/BiosId.env -else - VERSION_MINOR=3D0A - echo VERSION_MINOR =3D 0A >> $WORKSPACE/Conf/BiosId.env +if [ $BoardId =3D=3D "BG" ]; then + BOARD_REV=3DA + echo BOARD_REV =3D A >> $WORKSPACE/Conf/BiosId.env fi =20 +if [ $BoardId =3D=3D "MN" ]; then + if [ $FabId =3D=3D "B" ]; then + BOARD_REV=3DB + echo BOARD_REV =3D B >> $WORKSPACE/Conf/BiosId.env + else + BOARD_REV=3DA + echo BOARD_REV =3D 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=3D$(grep '^VERSION_MAJOR' Conf/BiosId.env | cut -d ' ' -f 3 = | cut -c 1-4) VERSION_MINOR=3D$(grep '^VERSION_MINOR' Conf/BiosId.env | cut -d ' ' -f 3 = | cut -c 1-2) -BIOS_Name=3D"$BOARD_ID""$SV_String""$Arch"_"$BUILD_TYPE"_"$VERSION_MAJOR"_= "$VERSION_MINOR" +BIOS_Name=3D"$BOARD_ID""$BOARD_REV""$SV_String""$Arch"_"$BUILD_TYPE"_"$VER= SION_MAJOR"_"$VERSION_MINOR" =20 cp -f $BUILD_PATH/FV/FVOBB.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch cp -f $BUILD_PATH/FV/FVOBBX.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch @@ -270,16 +286,25 @@ cp -f $BUILD_PATH/FV/FVIBBR.Fv $WORKSPACE/Platform/Br= oxtonPlatformPkg/Common/Too cp -f $BUILD_PATH/FV/FVIBBM.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch cp -f $BUILD_PATH/FV/FVIBBL.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch =20 -if [ $FabId =3D=3D "B" ]; then -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_B/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too= ls/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_B/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too= ls/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_B/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too= ls/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_B/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/T= ools/Stitch -else -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_A/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too= ls/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_A/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too= ls/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_A/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Too= ls/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/MinnowBo= ard3/FAB_A/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/T= ools/Stitch +if [ $BoardId =3D=3D "BG" ]; then + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benson= Glacier/FAB_A/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/= Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benson= Glacier/FAB_A/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/= Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benson= Glacier/FAB_A/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/= Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Benson= Glacier/FAB_A/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Commo= n/Tools/Stitch +fi + +if [ $BoardId =3D=3D "MN" ]; then + if [ $FabId =3D=3D "B" ]; then + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_B/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common= /Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_B/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common= /Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_B/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common= /Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_B/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch + else + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_A/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common= /Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_A/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common= /Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_A/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common= /Tools/Stitch + cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/Minn= owBoard3/FAB_A/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch + fi fi =20 # diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat b/Platform/BroxtonPl= atformPkg/BuildIFWI.bat index 838f9b3..8694da5 100644 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat @@ -7,6 +7,7 @@ set "Build_Flags=3D " set Arch=3DX64 set SkipUsageFlag=3DFALSE set FabId=3DB +set BoardId=3DMN set WORKSPACE=3D%CD% if %WORKSPACE:~-1%=3D=3D\ ( set WORKSPACE=3D%WORKSPACE:~0,-1% @@ -90,7 +91,18 @@ if /i "%~1"=3D=3D"/B" ( shift goto OptLoop ) - +if /i "%~1"=3D=3D"/MN" ( + set BoardId=3DMN + set Build_Flags=3D%Build_Flags% /MN + shift + goto OptLoop +) +if /i "%~1"=3D=3D"/BG" ( + set BoardId=3DBG + set Build_Flags=3D%Build_Flags% /BG + shift + goto OptLoop +) =20 :: Require 2 input parameters if "%~2"=3D=3D"" ( @@ -130,7 +142,7 @@ del /f/q ver_strings >nul :: Translate Release Build Type if "%BUILD_TYPE%"=3D=3D"R" set BUILD_TYPE=3DR =20 -set BIOS_Name=3D%BOARD_ID%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_%VERSION_MI= NOR% +set BIOS_Name=3D%BOARD_ID%%BOARD_REV%_%Arch%_%BUILD_TYPE%_%VERSION_MAJOR%_= %VERSION_MINOR% =20 :: Start Integration process echo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D @@ -139,8 +151,8 @@ echo. echo BIOS ROM input: %BIOS_Name% echo. pushd %STITCH_PATH% - echo - call IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %FabId% - call %STITCH_PATH%\IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %Fab= Id% + echo - call IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %FabId% %B= oardId% + call %STITCH_PATH%\IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %Fab= Id% %BoardId% @echo off popd if ErrorLevel 1 ( diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPla= tformPkg/BuildIFWI.sh index 82d5f45..73766cc 100755 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh @@ -35,6 +35,7 @@ exitCode=3D0 Build_Flags=3D Arch=3DIA32 FabId=3DB +BoardId=3DMN =20 =20 ## Parse Optional arguments @@ -55,6 +56,10 @@ for (( i=3D1; i<=3D$#; )) Arch=3DX64 Build_Flags=3D"$Build_Flags /x64" shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/BG" ]; then + BoardId=3DBG + Build_Flags=3D"$Build_Flags /BG" + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then FabId=3DB Build_Flags=3D"$Build_Flags /B" diff --git a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Sim= ple.bat b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple= .bat index c3bb2bd..679b0ee 100644 --- a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat +++ b/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Simple.bat @@ -30,6 +30,7 @@ if /i "%~1"=3D=3D"Help" goto Usage =20 set FspWrapper=3DFALSE set FabId=3DB +set BoardId=3DMN =20 if /i "%~2"=3D=3D"B" ( set FabId=3DB @@ -39,6 +40,14 @@ if /i "%~2"=3D=3D"A" ( set FabId=3DA ) =20 +if /i "%~3"=3D=3D"MN" ( + set BoardId=3DMN +) + +if /i "%~3"=3D=3D"BG" ( + set BoardId=3DBG +) + :OptLoop1 =20 if /i "%~1"=3D=3D"/FspW" ( @@ -95,6 +104,8 @@ if not "!BIOS_Name!"=3D=3D"!BIOS_Name:_R_=3D!" ( =20 if /i "!Platform_Type!"=3D=3D"MINN" ( set Platform_Type=3DMINN +) else if /i "!Platform_Type!"=3D=3D"BENS" ( + set Platform_Type=3DBENS ) else ( echo Error - Unsupported PlatformType: !Platform_Type! goto Usage @@ -119,18 +130,25 @@ 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 %FabId%=3D=3DB ( - 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+S= piChunk3.bin spi_out.bin - ) else ( - 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+S= piChunk3.bin spi_out.bin - ) =20 +if %BoardId%=3D=3DBG ( + copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk1.bin . + copy /y /b ..\..\Binaries\IFWI\BensonGlacier\FAB_A\SpiChunk2.bin . + copy /y /b ..\..\Binaries\IFWI\BensonGlacier\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+S= piChunk3.bin spi_out.bin +) else if %BoardId%=3D=3DMN ( + if %FabId%=3D=3DB ( + 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_COMPO= NENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvSto= rage.Fv+SpiChunk3.bin spi_out.bin + ) else ( + 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_COMPO= NENTS\IBB.Fv+SpiChunk2.bin+.\BIOS_COMPONENTS\OBB.Fv+.\BIOS_COMPONENTS\NvSto= rage.Fv+SpiChunk3.bin spi_out.bin + ) +) move /y spi_out.bin %BIOS_ID%.bin >> Stitching.log =20 if !ERRORLEVEL! NEQ 0 ( --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel