From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 3FFAF20348603 for ; Fri, 6 Jul 2018 07:57:42 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2018 07:57:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,316,1526367600"; d="scan'208";a="243154757" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 06 Jul 2018 07:57:38 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Jul 2018 07:57:38 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Jul 2018 07:57:37 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.124]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.173]) with mapi id 14.03.0319.002; Fri, 6 Jul 2018 22:57:35 +0800 From: "Yao, Jiewen" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH edk2-platforms\devel-MinPlatform] MinPlatform: Update batch file to call python.exe Thread-Index: AQHUFP16jmJbbbNBwECRtpyej4PdX6SCSVeQ Date: Fri, 6 Jul 2018 14:57:34 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AC8E4E4@shsmsx102.ccr.corp.intel.com> References: <1530863149-9232-1-git-send-email-liming.gao@intel.com> <1530863149-9232-2-git-send-email-liming.gao@intel.com> In-Reply-To: <1530863149-9232-2-git-send-email-liming.gao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWU4Y2JhZjUtNmMxOC00MTA3LWIxNjYtYmZjMjc5Y2M2NmY5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiOG9qTzNNWm9FWStqRUZKUDB6Unh0b28yUnY5XC9BTTNwRXpGM1h6aU96dWxKQm1nUktTZFVlZ1ZIS045M0pYdWEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: , X-List-Received-Date: Fri, 06 Jul 2018 14:57:42 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Li= ming > Gao > Sent: Thursday, July 5, 2018 11:46 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen > Subject: [edk2] [PATCH edk2-platforms\devel-MinPlatform] MinPlatform: > Update batch file to call python.exe >=20 > Use python.exe from PYTHON_HOME >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Liming Gao > Cc: Jiewen Yao > --- > 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(-) >=20 > diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat > b/Platform/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 %WORKSPACE_PLATFORM%\%PROJECT%\OpenBoardPkgPcd.dsc > -@call > python %WORKSPACE_PLATFORM%\%PLATFORM_PACKAGE%\Tools\Fsp\Rebas > eAndPatchFspBinBaseAddress.py %WORKSPACE_PLATFORM%\%PLATFORM_BO > ARD_PACKAGE%\Include\Fdf\FlashMapInclude.fdf %WORKSPACE_FSP_BIN%\K > abylakeFspBinPkg > Fsp.fd %WORKSPACE_PLATFORM%\%PROJECT%\OpenBoardPkgPcd.dsc 0x0 > +@call %PYTHON_HOME%\python.exe %WORKSPACE_PLATFORM%\%PLATFOR > M_PACKAGE%\Tools\Fsp\RebaseAndPatchFspBinBaseAddress.py %WORKSPACE > _PLATFORM%\%PLATFORM_BOARD_PACKAGE%\Include\Fdf\FlashMapInclude. > fdf %WORKSPACE_FSP_BIN%\KabylakeFspBinPkg > 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/RebaseAndPatchFspBinBaseAddress > .py > b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress > .py > index 7fe26df..35f3f8c 100644 > --- > a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress > .py > +++ > b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress > .py > @@ -71,7 +71,8 @@ file.close() > # Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin= .py > script > # to dump the header, and get the ImageSize in FSP-M section > # > -Process =3D subprocess.Popen("python edk2\IntelFsp2Pkg\Tools\SplitFspBin= .py > info -f" + fspBinFilePath, stdout=3Dsubprocess.PIPE) > +pythontool =3D os.environ['PYTHON_HOME'] + '\python.exe' > +Process =3D subprocess.Popen(pythontool + " > edk2\IntelFsp2Pkg\Tools\SplitFspBin.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 u= sing > SplitFspBin.py > # > rebaseArguments =3D fspBinFilePath + " -c s m t -b " + > str(hex(fspSBaseAddress).rstrip("L")) + " " + > str(hex(fspMBaseAddress).rstrip("L")) + " " + > str(hex(fspTBaseAddress).rstrip("L")) + " -o" + fspBinPath + " -n " + > fspBinFileRebased > -os.system("python edk2\IntelFsp2Pkg\Tools\SplitFspBin.py rebase -f" + > rebaseArguments) > +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 " + fspBi= nPath + " > -n Fsp_Rebased.fd" > -os.system("python edk2\IntelFsp2Pkg\Tools\SplitFspBin.py split -f" + > splitArguments) > +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 buil= d will use > the same. > diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/postbuild.b= at > 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\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt > FvTempMemorySilicon > -call > python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools\ > PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt > FvTempMemorySilicon > +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform > \Intel\MinPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE > %\edk2-non-osi\Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildR= e > port.txt FvTempMemorySilicon > 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\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon > -call > python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools\ > PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon > +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform > \Intel\MinPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE > %\edk2-non-osi\Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildR= e > port.txt FvPreMemorySilicon > 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\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPostMemorySilicon > -call > python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools\ > PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPostMemorySilicon > +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform > \Intel\MinPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE > %\edk2-non-osi\Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildR= e > port.txt FvPostMemorySilicon > 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\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvLateSilicon > -call > python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools\ > PatchFv\PatchBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel\ > PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvLateSilicon > +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform > \Intel\MinPlatformPkg\Tools\PatchFv\PatchBinFv.py %TARGET% %WORKSPACE > %\edk2-non-osi\Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\BuildR= e > port.txt FvLateSilicon > 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 > \PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon > gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase > -call > python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools\ > PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel > \PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt FvPreMemorySilicon > gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase > +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform > \Intel\MinPlatformPkg\Tools\PatchFv\RebaseBinFv.py %TARGET% %WORKSPAC > E%\edk2-non-osi\Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\Build= R > eport.txt FvPreMemorySilicon > 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 > \PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt > FvPostMemorySilicon gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase > -call > python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools\ > PatchFv\RebaseBinFv.py %TARGET% %WORKSPACE%\edk2-non-osi\Silicon\Intel > \PurleySiliconBinPkg %WORKSPACE%\Build\BuildReport.txt > FvPostMemorySilicon gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase > +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform > \Intel\MinPlatformPkg\Tools\PatchFv\RebaseBinFv.py %TARGET% %WORKSPAC > E%\edk2-non-osi\Silicon\Intel\PurleySiliconBinPkg %WORKSPACE%\Build\Build= R > eport.txt FvPostMemorySilicon > 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%_%TOOL_CHAIN_TAG%\FV\PLATFORM.fd %WORKSPACE%\Build\Bu > ildReport.txt gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase > -call > python %WORKSPACE%\edk2-platforms\Platform\Intel\MinPlatformPkg\Tools\ > PatchFv\PatchBfv.py %WORKSPACE%\Build\%BOARD_PKG%\%BOARD_NAME% > \%TARGET%_%TOOL_CHAIN_TAG%\FV\PLATFORM.fd %WORKSPACE%\Build\Bu > ildReport.txt gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase > +call %PYTHON_HOME%\python.exe %WORKSPACE%\edk2-platforms\Platform > \Intel\MinPlatformPkg\Tools\PatchFv\PatchBfv.py %WORKSPACE%\Build\%BOA > RD_PKG%\%BOARD_NAME%\%TARGET%_%TOOL_CHAIN_TAG%\FV\PLATFOR > M.fd %WORKSPACE%\Build\BuildReport.txt > gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryBase > if %ERRORLEVEL% NEQ 0 ( > set SCRIPT_ERROR=3D1 > echo PatchBfv Error. Exit > -- > 2.10.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel