.../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
From: Mingyue Liang <mingyuex.liang@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@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@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/RebaseAndPatchFspBinBaseAddress.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 (#75858): https://edk2.groups.io/g/devel/message/75858
Mute This Topic: https://groups.io/mt/83202048/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Bob Feng <bob.c.feng@intel.com> -----Original Message----- From: Chen, Christine <yuwei.chen@intel.com> Sent: Monday, May 31, 2021 11:08 AM To: devel@edk2.groups.io Cc: Liang, MingyueX <mingyuex.liang@intel.com>; Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn> Subject: [Edk2-platforms][PATCH] Tools/Fsp: Replace PYTHON_HOME with sys.executable From: Mingyue Liang <mingyuex.liang@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@intel.com> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@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/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.