From nobody Sun Apr 28 22:35:34 2024 Delivered-To: importer@patchew.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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 153086319464464.51774817111016; Fri, 6 Jul 2018 00:46:34 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 76E212033737D; Fri, 6 Jul 2018 00:46:33 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 626C9203369D4 for ; Fri, 6 Jul 2018 00:46:31 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2018 00:46:31 -0700 Received: from shwde7172.ccr.corp.intel.com ([10.239.158.25]) by orsmga004.jf.intel.com with ESMTP; 06 Jul 2018 00:46:30 -0700 X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,315,1526367600"; d="scan'208";a="213860474" From: Liming Gao To: edk2-devel@lists.01.org Date: Fri, 6 Jul 2018 15:45:47 +0800 Message-Id: <1530863149-9232-2-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 In-Reply-To: <1530863149-9232-1-git-send-email-liming.gao@intel.com> References: <1530863149-9232-1-git-send-email-liming.gao@intel.com> Subject: [edk2] [PATCH edk2-platforms\devel-MinPlatform] MinPlatform: Update batch file to call python.exe X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jiewen Yao 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" Use python.exe from PYTHON_HOME Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Jiewen Yao Reviewed-by: Jiewen.yao@intel.com --- Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 2 +- .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 7 ++++--- .../Intel/PurleyOpenBoardPkg/BoardMtOlympus/postbuild.bat | 14 +++++++---= ---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat b/Pla= tform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat index 6b0918c..e0ad5ee 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat @@ -50,7 +50,7 @@ del /f %WORKSPACE_FSP_BIN%\KabylakeFspBinPkg\Fsp_Rebased*= .fd cd %WORKSPACE% =20 if exist %WORKSPACE_PLATFORM%\%PROJECT%\OpenBoardPkgPcd.dsc attrib -r %WOR= KSPACE_PLATFORM%\%PROJECT%\OpenBoardPkgPcd.dsc -@call python %WORKSPACE_PLATFORM%\%PLATFORM_PACKAGE%\Tools\Fsp\RebaseAndPa= tchFspBinBaseAddress.py %WORKSPACE_PLATFORM%\%PLATFORM_BOARD_PACKAGE%\Inclu= de\Fdf\FlashMapInclude.fdf %WORKSPACE_FSP_BIN%\KabylakeFspBinPkg Fsp.fd %WO= RKSPACE_PLATFORM%\%PROJECT%\OpenBoardPkgPcd.dsc 0x0 +@call %PYTHON_HOME%\python.exe %WORKSPACE_PLATFORM%\%PLATFORM_PACKAGE%\Too= ls\Fsp\RebaseAndPatchFspBinBaseAddress.py %WORKSPACE_PLATFORM%\%PLATFORM_BO= ARD_PACKAGE%\Include\Fdf\FlashMapInclude.fdf %WORKSPACE_FSP_BIN%\KabylakeFs= pBinPkg Fsp.fd %WORKSPACE_PLATFORM%\%PROJECT%\OpenBoardPkgPcd.dsc 0x0 =20 @if %ERRORLEVEL% NEQ 0 ( @echo !!! ERROR:RebaseAndPatchFspBinBaseAddress failed!!! diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBa= seAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBin= BaseAddress.py index 7fe26df..35f3f8c 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py @@ -71,7 +71,8 @@ file.close() # Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.p= y script=20 # to dump the header, and get the ImageSize in FSP-M section # -Process =3D subprocess.Popen("python edk2\IntelFsp2Pkg\Tools\SplitFspBin.p= y info -f" + fspBinFilePath, stdout=3Dsubprocess.PIPE) +pythontool =3D os.environ['PYTHON_HOME'] + '\python.exe' +Process =3D subprocess.Popen(pythontool + " edk2\IntelFsp2Pkg\Tools\SplitF= spBin.py info -f" + fspBinFilePath, stdout=3Dsubprocess.PIPE) Output =3D Process.communicate()[0] FsptInfo =3D Output.rsplit("FSP_M", 1); for line in FsptInfo[1].split("\n"): @@ -88,13 +89,13 @@ fspTBaseAddress =3D flashBase + fspTBaseOffset # Re-base FSP bin file to new address and save it as fspBinFileRebased usi= ng SplitFspBin.py # rebaseArguments =3D fspBinFilePath + " -c s m t -b " + str(hex(fspSBaseAdd= ress).rstrip("L")) + " " + str(hex(fspMBaseAddress).rstrip("L")) + " " + st= r(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " + fspBinF= ileRebased -os.system("python edk2\IntelFsp2Pkg\Tools\SplitFspBin.py rebase -f" + reba= seArguments) +os.system(pythontool + " edk2\IntelFsp2Pkg\Tools\SplitFspBin.py rebase -f"= + rebaseArguments) =20 # # Split FSP bin to FSP-S/M/T segments # splitArguments =3D fspBinPath +"\\" + fspBinFileRebased + " -o " + fspBinP= ath + " -n Fsp_Rebased.fd" -os.system("python edk2\IntelFsp2Pkg\Tools\SplitFspBin.py split -f" + split= Arguments) +os.system(pythontool + " edk2\IntelFsp2Pkg\Tools\SplitFspBin.py split -f" = + splitArguments) =20 # # Patch dsc file with the re-based FSP-S/M/T address, so internally build = will use the same. diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/postbuild.bat= b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/postbuild.bat index 807b942..5c787bb 100644 --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/postbuild.bat +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/postbuild.bat @@ -18,28 +18,28 @@ set /a postbuildstep=3D0 @echo BoardPostBuild.%postbuildstep% python PatchBinFv.py @set /a postbuildstep=3D%postbuildstep%+1 echo python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvTempMemorySilicon -call python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvTempMemorySilicon +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform\Intel\Mi= nPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\= Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvTempM= emorySilicon if %ERRORLEVEL% NEQ 0 ( set SCRIPT_ERROR=3D1 echo PatchBinFv Error. Exit goto :EOF ) echo python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon -call python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform\Intel\Mi= nPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\= Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMe= morySilicon if %ERRORLEVEL% NEQ 0 ( set SCRIPT_ERROR=3D1 echo PatchBinFv Error. Exit goto :EOF ) echo python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPostMemorySilicon -call python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPostMemorySilicon +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform\Intel\Mi= nPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\= Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPostM= emorySilicon if %ERRORLEVEL% NEQ 0 ( set SCRIPT_ERROR=3D1 echo PatchBinFv Error. Exit goto :EOF ) echo python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvLateSilicon -call python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Purl= eySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvLateSilicon +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform\Intel\Mi= nPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\= Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvLateS= ilicon if %ERRORLEVEL% NEQ 0 ( set SCRIPT_ERROR=3D1 echo PatchBinFv Error. Exit @@ -50,7 +50,7 @@ if %ERRORLEVEL% NEQ 0 ( @echo BoardPostBuild.%postbuildstep% python RebaseBinFv.py @set /a postbuildstep=3D%postbuildstep%+1 echo python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Pur= leySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon gMinP= latformPkgTokenSpaceGuid.PcdFlashFvFspMBase -call python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Pur= leySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon gMinP= latformPkgTokenSpaceGuid.PcdFlashFvFspMBase +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform\Intel\Mi= nPlatformPkg\Tools\PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi= \Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreM= emorySilicon gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase if %ERRORLEVEL% NEQ 0 ( set SCRIPT_ERROR=3D1 echo RebaseBinFv Error. Exit @@ -58,7 +58,7 @@ if %ERRORLEVEL% NEQ 0 ( ) =20 echo python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Pur= leySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPostMemorySilicon gMin= PlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase -call python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\Pur= leySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPostMemorySilicon gMin= PlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform\Intel\Mi= nPlatformPkg\Tools\PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi= \Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPost= MemorySilicon gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase if %ERRORLEVEL% NEQ 0 ( set SCRIPT_ERROR=3D1 echo RebaseBinFv Error. Exit @@ -80,7 +80,7 @@ if %ERRORLEVEL% NEQ 0 ( @echo BoardPostBuild.%postbuildstep% python PatchBfv.py @set /a postbuildstep=3D%postbuildstep%+1 echo python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBfv.py %WORKSPACE%\Build\%BOARD_PKG%\%BOARD_NAME%\%TARGET%_%T= OOL_CHAIN_TAG%\FV\PLATFORM.fd %WORKSPACE%\Build\BuildReport.txt gMinPlatfor= mPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase -call python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools= \PatchFv\PatchBfv.py %WORKSPACE%\Build\%BOARD_PKG%\%BOARD_NAME%\%TARGET%_%T= OOL_CHAIN_TAG%\FV\PLATFORM.fd %WORKSPACE%\Build\BuildReport.txt gMinPlatfor= mPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform\Intel\Mi= nPlatformPkg\Tools\PatchFv\PatchBfv.py %WORKSPACE%\Build\%BOARD_PKG%\%BOARD= _NAME%\%TARGET%_%TOOL_CHAIN_TAG%\FV\PLATFORM.fd %WORKSPACE%\Build\BuildRepo= rt.txt gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase if %ERRORLEVEL% NEQ 0 ( set SCRIPT_ERROR=3D1 echo PatchBfv Error. Exit --=20 2.10.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel