From nobody Fri May 3 11:36:42 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.zoho.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 1496908709900965.2488373540486; Thu, 8 Jun 2017 00:58:29 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 76A4A2094553A; Thu, 8 Jun 2017 00:57:18 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 84B7A20945529 for ; Thu, 8 Jun 2017 00:57:16 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2017 00:58:24 -0700 Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.135]) by orsmga002.jf.intel.com with SMTP; 08 Jun 2017 00:58:23 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,314,1493708400"; d="scan'208";a="96980814" Date: Thu, 8 Jun 2017 15:58:21 +0800 From: lushifex To: edk2-devel@lists.01.org Message-ID: <266de34b-0a2d-40a6-be91-95dc5ad6ba6e@SHWDEOPENPSI011.local> 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 differentiate FAB A and FAB B Board. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex Reviewed-by: zwei4 =20 --- 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=3D set BuildTarget=3DDebug set Compiler=3D/vs13 set Arch=3D/x64 -set Stepping=3D/B +set FabId=3D/B =20 :: Optional arguments :OptLoop @@ -61,13 +61,13 @@ if /i "%~1"=3D=3D"/vs15" ( goto OptLoop ) if /i "%~1"=3D=3D"/A" ( - set Stepping=3D/A + set FabId=3D/A echo. shift goto OptLoop ) if /i "%~1"=3D=3D"/B" ( - set Stepping=3D/B + set FabId=3D/B echo. shift goto OptLoop @@ -83,8 +83,8 @@ set BuildTarget=3D%~2 =20 :OptLoopEnd echo ---- Call Build Script of Broxton ---- -echo calling : Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler= % %Arch% %Stepping% /fspw %BuildFlags% MINN %BuildTarget%=20 -call Platform\%PlatformName%PlatformPkg\BuildIFWI.bat %Compiler% %Arch% %= Stepping% /fspw %BuildFlags% MINN %BuildTarget%=20 +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 =20 goto Exit =20 @@ -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 =20 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 IMP= LIED. # + +##********************************************************************** +## Initial Setup +##********************************************************************** + +Build_Flags=3D + +## Parse Optional arguments +if [ "$1" =3D=3D "/?" ]; then + Usage +fi + +## Build Flags +for (( i=3D1; i<=3D$#; )) + do + if [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then + FabId=3DB + Build_Flags=3D"$Build_Flags /B" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/A" ]; then + FabId=3DA + Build_Flags=3D"$Build_Flags /A" + shift + else + break + fi + done + Target_Flag=3DRelease if [ "$1" =3D=3D "Debug" ]; then Target_Flag=3DDebug @@ -18,6 +46,7 @@ if [ "$1" =3D=3D "Release" ]; then shift fi =20 +echo $Build_Flags echo $Target_Flag =20 export WORKSPACE=3D`pwd` @@ -27,5 +56,5 @@ export PACKAGES_PATH=3D$WORKSPACE:$WORKSPACE/Core:$WORKSP= ACE/Silicon/:$WORKSPACE/P =20 make -C BaseTools =20 -bash ./Platform/BroxtonPlatformPkg/BuildIFWI.sh APLI $Target_Flag +bash ./Platform/BroxtonPlatformPkg/BuildIFWI.sh $Build_Flags APLI $Target_= Flag =20 diff --git a/Platform/BroxtonPlatformPkg/BuildBios.bat b/Platform/BroxtonPl= atformPkg/BuildBios.bat index 80de2f4..5e06a98 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.bat +++ b/Platform/BroxtonPlatformPkg/BuildBios.bat @@ -24,7 +24,7 @@ set "Build_Flags=3D " set exitCode=3D0 set Arch=3DX64 set Compiler=3DVS2013 -set Stepping=3DB +set FabId=3DB if not defined BiosVersion set BiosVersion=3DDEV =20 =20 @@ -154,13 +154,13 @@ if /i "%~1"=3D=3D"/FspW" ( goto OptLoop ) if /i "%~1"=3D=3D"/A" ( - set Stepping=3DA + set FabId=3DA echo. shift goto OptLoop ) if /i "%~1"=3D=3D"/B" ( - set Stepping=3DB + set FabId=3DB 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 =20 if /i "%FSP_WRAPPER%" =3D=3D "TRUE" ( - if %Stepping%=3D=3DB ( :: 0xFEF7A000 =3D gIntelFsp2WrapperTokenSpaceGuid.PcdFlashFvFspBase =3D $= (CAR_BASE_ADDRESS) + $(BLD_RAM_DATA_SIZE) + $(FSP_RAM_DATA_SIZE) + $(FSP_EM= P_DATA_SIZE) + $(BLD_IBBM_SIZE) pushd %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBinPk= g\FspBin python %WORKSPACE%\Core\IntelFsp2Pkg\Tools\SplitFspBin.py rebase -f Ap= olloLakeFsp.fd -c m -b 0xFEF7A000 -o .\ -n FSP.fd @@ -418,14 +417,6 @@ if /i "%FSP_WRAPPER%" =3D=3D "TRUE" ( copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBi= nPkg\FspBin\FSP_T.Fv %Storage_Folder%\FSP_T.Fv copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBi= nPkg\FspBin\FSP_M.Fv %Storage_Folder%\FSP_M.Fv copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspBi= nPkg\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\ApolloLakeFspGo= ld\FSP\FSP_T.Fv %Storage_Folder%\FSP_T.Fv - copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGo= ld\FSP\FSP_M.Fv %Storage_Folder%\FSP_M.Fv - copy /y/b %WORKSPACE%\Silicon\BroxtonSoC\BroxtonFspPkg\ApolloLakeFspGo= ld\FSP\FSP_S.Fv %Storage_Folder%\FSP_S.Fv - ) ) =20 echo Get NvStorage Base and Size... diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPla= tformPkg/BuildBios.sh index fb6ac67..a1f4766 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.sh +++ b/Platform/BroxtonPlatformPkg/BuildBios.sh @@ -28,6 +28,7 @@ Build_Flags=3D SV_String=3D_ exitCode=3D0 Arch=3DX64 +FabId=3DB =20 ## Initialize all the build flags to FALSE ## depending on the cmd line input, some will be set to TRUE prior to buil= ding @@ -129,6 +130,12 @@ for (( i=3D1; i<=3D$#; )) elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/X64" ]; then Arch=3DX64 shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then + FabId=3DB + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/A" ]; then + FabId=3DA + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/VP" ]; then VP_BIOS_ENABLE=3DTRUE shift @@ -294,12 +301,18 @@ cp -f $BUILD_PATH/FV/FVOBBX.Fv $WORKSPACE/Platform/Br= oxtonPlatformPkg/Common/Too cp -f $BUILD_PATH/FV/FVIBBR.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Comm= on/Tools/Stitch 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 -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Steppi= ng/SpiChunk1.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Steppi= ng/SpiChunk2.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Steppi= ng/SpiChunk3.bin $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch -cp -f $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Binaries/IFWI/B_Steppi= ng/GCC/NvStorage.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Sti= tch - =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 +fi =20 # # Assmeble components diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.bat b/Platform/BroxtonPl= atformPkg/BuildIFWI.bat index e8e1c4f..9c645a7 100644 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.bat +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.bat @@ -6,7 +6,7 @@ set exitCode=3D0 set "Build_Flags=3D " set Arch=3DX64 set SkipUsageFlag=3DFALSE -set Stepping=3DB +set FabId=3DB set WORKSPACE=3D%CD% if %WORKSPACE:~-1%=3D=3D\ ( set WORKSPACE=3D%WORKSPACE:~0,-1% @@ -79,13 +79,13 @@ if /i "%~1"=3D=3D"/FspW" ( goto OptLoop ) if /i "%~1"=3D=3D"/A" ( - set Stepping=3DA + set FabId=3DA set Build_Flags=3D%Build_Flags% /A shift goto OptLoop ) if /i "%~1"=3D=3D"/B" ( - set Stepping=3DB + set FabId=3DB set Build_Flags=3D%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% %Ste= pping% + echo - call IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %FabId% + call %STITCH_PATH%\IFWIStitch_Simple.bat %STITCH_PATH%\%BIOS_Name% %Fab= Id% @echo off popd if ErrorLevel 1 ( diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPla= tformPkg/BuildIFWI.sh index c21904f..69ed67a 100755 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh @@ -60,6 +60,7 @@ exitCode=3D0 Build_Flags=3D Stitch_Flags=3D Arch=3DIA32 +FabId=3DB =20 ## Description of each Platform/Board_ID ## APLK - Netbook/Desktop (PCCG) @@ -107,6 +108,14 @@ for (( i=3D1; i<=3D$#; )) Arch=3DX64 Build_Flags=3D"$Build_Flags /x64" shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/B" ]; then + FabId=3DB + Build_Flags=3D"$Build_Flags /B" + shift + elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/A" ]; then + FabId=3DA + Build_Flags=3D"$Build_Flags /A" + shift elif [ "$(echo $1 | tr 'a-z' 'A-Z')" =3D=3D "/VP" ]; then Build_Flags=3D"$Build_Flags /vp" shift diff --git a/Platform/BroxtonPlatformPkg/Common/Tools/Stitch/IFWIStitch_Sim= ple.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"=3D=3D"/?" goto Usage if /i "%~1"=3D=3D"Help" goto Usage =20 set FspWrapper=3DFALSE -set Stepping=3DB +set FabId=3DB =20 if /i "%~2"=3D=3D"B" ( - set Stepping=3DB + set FabId=3DB ) =20 if /i "%~2"=3D=3D"A" ( - set Stepping=3DA + set FabId=3DA ) =20 :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%=3D=3DB ( - 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%=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\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_C= OMPONENTS\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+S= piChunk3.bin spi_out.bin ) =20 move /y spi_out.bin %BIOS_ID%.bin >> Stitching.log --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel