[edk2-devel] [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable

Bob Feng bob.c.feng at intel.com
Mon May 31 03:33:42 UTC 2021


Reviewed-by: Bob Feng <bob.c.feng at intel.com>

-----Original Message-----
From: Chen, Christine <yuwei.chen at intel.com> 
Sent: Monday, May 31, 2021 11:08 AM
To: devel at edk2.groups.io
Cc: Liang, MingyueX <mingyuex.liang at intel.com>; Feng, Bob C <bob.c.feng at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>
Subject: [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable

From: Mingyue Liang <mingyuex.liang at intel.com>

Currently script Python interpreter is inconsistent with the interpreter specified by Python home. This patch is to change pythonhome to sys.executable.

Signed-off-by:  MingYue Liang <mingyuex.liang at intel.com>
Cc: Yuwei Chen <yuwei.chen at intel.com>
Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
---
 .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py              | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py
index 406e5ec130..9e58cbe312 100644
--- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py
+++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAd
+++ dress.py
@@ -73,9 +73,7 @@ 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 #-pythontool = 'python'-if 'PYTHON_HOME' in os.environ:-    pythontool = os.environ['PYTHON_HOME'] + os.sep + 'python'+pythontool = sys.executable Process = subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fspBinFilePath], stdout=subprocess.PIPE) Output = Process.communicate()[0] FsptInfo = Output.rsplit(b"FSP_M", 1);-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#75864): https://edk2.groups.io/g/devel/message/75864
Mute This Topic: https://groups.io/mt/83202048/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list