From nobody Sat Dec 28 12:39:27 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 1494914517826101.4101368830759; Mon, 15 May 2017 23:01:57 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0369D21A16E4A; Mon, 15 May 2017 23:01:55 -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 EC9C021A6F106 for ; Mon, 15 May 2017 23:01:52 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 May 2017 23:01:52 -0700 Received: from zwei4-mobl.ccr.corp.intel.com ([10.239.197.157]) by fmsmga005.fm.intel.com with ESMTP; 15 May 2017 23:01:52 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,348,1491289200"; d="scan'208";a="102132613" From: zwei4 To: edk2-devel@lists.01.org Date: Tue, 16 May 2017 14:01:49 +0800 Message-Id: <20170516060149.17056-1-david.wei@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] GCC build script change. 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: , MIME-Version: 1.0 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" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zwei4 --- BuildBIOS.sh | 8 ++- Platform/BroxtonPlatformPkg/BuildBios.sh | 86 ++++++++++++++++------------= ---- Platform/BroxtonPlatformPkg/BuildIFWI.sh | 4 +- 3 files changed, 52 insertions(+), 46 deletions(-) diff --git a/BuildBIOS.sh b/BuildBIOS.sh index 49a9e1b12..0dece1f77 100755 --- a/BuildBIOS.sh +++ b/BuildBIOS.sh @@ -8,6 +8,12 @@ # 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. # +Target_Flag=3DRelease +if [ "$1" =3D=3D "Debug" ]; then + Target_Flag=3DDebug +fi + +echo $Target_Flag =20 export WORKSPACE=3D`pwd` export PACKAGES_PATH=3D$WORKSPACE:$WORKSPACE/Core:$WORKSPACE/Silicon/:$WOR= KSPACE/Platform:$WORKSPACE/Platform/BroxtonPlatformPkg:$WORKSPACE/Silicon/B= roxtonSoC:$WORKSPACE/Platform/BroxtonPlatformPkg/Common @@ -16,5 +22,5 @@ export PACKAGES_PATH=3D$WORKSPACE:$WORKSPACE/Core:$WORKSP= ACE/Silicon/:$WORKSPACE/P =20 make -C BaseTools =20 -./Platform/BroxtonPlatformPkg/BuildIFWI.sh APLI Release +. ./Platform/BroxtonPlatformPkg/BuildIFWI.sh APLI $Target_Flag =20 diff --git a/Platform/BroxtonPlatformPkg/BuildBios.sh b/Platform/BroxtonPla= tformPkg/BuildBios.sh index 3963c887a..88ea12f8c 100644 --- a/Platform/BroxtonPlatformPkg/BuildBios.sh +++ b/Platform/BroxtonPlatformPkg/BuildBios.sh @@ -76,19 +76,9 @@ cp $WORKSPACE/BaseTools/Conf/tools_def.template $WORKSPA= CE/Conf/tools_def.txt cp $WORKSPACE/BaseTools/Conf/build_rule.template $WORKSPACE/Conf/build_rul= e.txt =20 =20 -## Get gcc version to determine which tool_def.template to use. -## If gcc version is 4.6 or before, use default. If not, use new one. -GCCVERSION=3D$(gcc --version | grep 'gcc' | grep '[0-9]' | cut -d ' ' -f 4= | cut -d '.' -f 2) -if (($GCCVERSION > 6)); then - echo "GCC version is 4.7 or after" - TOOL_CHAIN_TAG=3DGCC47 -else - echo "Type 'gcc --version' to check version" - echo "Please update GCC version to 4.7 or later" - ErrorExit -fi =20 -#make -C BaseTools > /dev/null + +TOOL_CHAIN_TAG=3DGCC5 =20 ## Define platform specific environment variables. PLATFORM_NAME=3DBroxtonPlatformPkg @@ -268,28 +258,32 @@ build $Build_Flags ##********************************************************************** ## Post Build processing and cleanup ##********************************************************************** + +# +# FSP Rebase and Split +# +# 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/ApolloLakeFspBinPkg/Fsp= Bin +python $WORKSPACE/Core/IntelFsp2Pkg/Tools/SplitFspBin.py rebase -f ApolloL= akeFsp.fd -c m -b 0xFEF7A000 -o ./ -n FSP.fd +python $WORKSPACE/Core/IntelFsp2Pkg/Tools/SplitFspBin.py split -f FSP.fd -= o ./ -n FSP.Fv +popd +cp -f $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/FspB= in/FSP_T.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/FspB= in/FSP_M.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch +cp -f $WORKSPACE/Silicon/BroxtonSoC/BroxtonFspPkg/ApolloLakeFspBinPkg/FspB= in/FSP_S.Fv $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch + + =20 grep "_PCD_VALUE_" $BUILD_PATH/IA32/BroxtonPlatformPkg/PlatformPei/Platfor= mPei/DEBUG/AutoGen.h > FlashMap.h =20 + #echo "Running fce..." ## Extract Hii data from build and store in HiiDefaultData.txt #wine PlatformTools/FCE/FCE.exe read -i $BUILD_PATH/FV/SOC.fd > $BUILD_PAT= H/FV/HiiDefaultData.txt 1>>EDK2.log 2>&1 =20 ## copy the Setup variable to the SetupDefault variable and save changes t= o BxtXXX.fd #wine PlatformTools/FCE/FCE.exe mirror -i $BUILD_PATH/FV/SOC.fd -o $BUILD_= PATH/FV/Bxt"$Arch".fd Setup SetupDefault 1>>EDK2.log 2>&1 -echo "Skip FCE tool..." +#echo "Skip FCE tool..." cp $BUILD_PATH/FV/SOC.fd $BUILD_PATH/FV/Bxt"$Arch".fd =20 -##echo Running KeyEnroll... -## RestrictedBegin -##if /i not "$Platform_Type" =3D=3D "$eNB_RVP" ( -## call $PLATFORM_PACKAGE/Restricted/Internal/Tools/KeyEnroll/KeyEnroll.= bat $BUILD_PATH $BUILD_PATH/FV/Vlv"$Arch".fd 1>>EDK2.log 2>&1 -##) else if /i "$Platform_Type" =3D=3D "$eNB_RVP" ( -## call $PLATFORM_PACKAGE/Restricted/Internal/Tools/KeyEnroll/BBAY-KeyEn= roll.bat $BUILD_PATH $BUILD_PATH/FV/Vlv"$Arch".fd 1>>EDK2.log 2>&1 -##) -## if %ERRORLEVEL% NEQ 0 goto BldFail -## RestrictedEnd -echo Skip "KeyEnroll tool..." - ## Set the Board_Id, Build_Type, Version_Major, and Version_Minor environm= ent variables ##find /v "#" Conf\BiosId.env > ver_strings ##for /f "tokens=3D1,3" %%i in (ver_strings) do set %%i=3D%%j @@ -298,28 +292,36 @@ echo Skip "KeyEnroll tool..." 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" -cp -f $BUILD_PATH/FV/Bxt"$Arch".fd $WORKSPACE/$BIOS_Name.ROM -cp -f $BUILD_PATH/FV/FVOBB.Fv $WORKSPACE -cp -f $BUILD_PATH/FV/FVOBBX.Fv $WORKSPACE -cp -f $BUILD_PATH/FV/FVIBBR.Fv $WORKSPACE -cp -f $BUILD_PATH/FV/FVIBBM.Fv $WORKSPACE -cp -f $BUILD_PATH/FV/FVIBBL.Fv $WORKSPACE +cp -f $BUILD_PATH/FV/Bxt"$Arch".fd $WORKSPACE/Platform/BroxtonPlatformPkg= /Common/Tools/Stitch/$BIOS_Name.ROM +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 +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 cp FlashMap.h $WORKSPACE/$BIOS_Name.map =20 -echo -echo "Skip Running BIOS_Signing.bat ..." -#echo "Running BIOS_Signing.bat ..." -##pushd Stitch/BIOS_Signing -##set SEC_Ver=3D1.0.0.1054 -##call BIOS_Signing.bat ../../$BIOS_Name $target $Arch BLAK $SEC_Ver = >>../../EDK2.log 2>&1 -## use temp signing until Signing Script can be updated for BXT -#cd Stitch/BIOS_Signing_Temp -#./SBT_sign_no_KM_3M.sh ../../$BIOS_Name >>../../EDK2.log 2>&1 -#echo "BIOS signing complete" + +# +# Assmeble components +# +pushd $WORKSPACE/Platform/BroxtonPlatformPkg/Common/Tools/Stitch + +cat FVIBBL.Fv > IBBL.Fv + +cat FVIBBM.Fv FSP_M.Fv > IBB.Fv + +cat FSP_S.Fv FVIBBR.Fv FVOBB.Fv FVOBBX.Fv > OBB.Fv + +cat SpiChunk1.bin IBBL.Fv IBB.Fv SpiChunk2.bin OBB.Fv NvStorage.Fv SpiChun= k3.bin > MINNOWV3.X64.0063.IFWI.SPI.bin + +popd =20 echo -echo Build location: $BUILD_PATH -echo BIOS ROM Created: $BIOS_Name +echo SPI IFWI location: $WORKSPACE/Platform/BroxtonPlatformPkg/Common/= Tools/Stitch/MINNOWV3.X64.0063.IFWI.SPI.bin echo echo -------------------- The EDKII BIOS build has successfully completed.= -------------------- echo diff --git a/Platform/BroxtonPlatformPkg/BuildIFWI.sh b/Platform/BroxtonPla= tformPkg/BuildIFWI.sh index df518287f..bf91b5c18 100755 --- a/Platform/BroxtonPlatformPkg/BuildIFWI.sh +++ b/Platform/BroxtonPlatformPkg/BuildIFWI.sh @@ -165,6 +165,4 @@ sh Platform/BroxtonPlatformPkg/BuildBios.sh $Build_Flag= s $Platform_Type $Build_T echo echo Finished Building BIOS. =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 -echo Skip "Build_IFWI: Calling IFWI Stitching Script..." + --=20 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel