From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web08.20969.1621850460943036125 for ; Mon, 24 May 2021 03:01:01 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ianx.kuo@intel.com) IronPort-SDR: jtiglsIbQq+YJZiFtbiRKN3GmJvdkH+nT26JJ9D9HUwTpLBrR8Q58/2mxNNHgBTe6MN9XmWfks JbsAgXd74IZA== X-IronPort-AV: E=McAfee;i="6200,9189,9993"; a="181537516" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="181537516" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2021 03:00:58 -0700 IronPort-SDR: FAo4iXa2lwuzNGv4qiLbSB6ntM9IfL+Jn0hm7lUNXwDc9OklvailWTNszbmxiC9wdAg72sYVAA 7X8ql0c/XZSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="545862622" Received: from ikuox-tiger-lake-client-platform.itwn.intel.com ([10.5.215.23]) by fmsmga001.fm.intel.com with ESMTP; 24 May 2021 03:00:43 -0700 From: "IanX Kuo" To: devel@edk2.groups.io Cc: IanX Kuo , Chasel Chiu , Nate DeSimone Subject: [PATCH v3] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3412 Date: Mon, 24 May 2021 06:38:05 +0800 Message-Id: <6ba48b2f5b7676eb6bf1199e51ce691b54beff5f.1621846279.git.ianx.kuo@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: IanX Kuo (a) C:\Users\\AppData\Local\Program\Python\Python38 (b) C:\Python38 (c) C:\Program Files\Python38 Issue only happens on (a) and (c). (a) happen on have whitespace. Ex: Tony Chen (c) happen on "Program Files" have whitespace. Cc: Chasel Chiu Cc: Nate DeSimone Signed-off-by: IanX Kuo --- .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py | 6 +++--- .../MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBa= seAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBin= BaseAddress.py index 406e5ec130..f3cba2651a 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py @@ -1,6 +1,6 @@ ## @ RebaseAndPatchFspBinBaseAddress.py=0D #=0D -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
=0D +# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D =0D @@ -93,13 +93,13 @@ fspTBaseAddress =3D flashBase + fspTBaseOffset # Re-base FSP bin file to new address and save it as fspBinFileRebased usi= ng SplitFspBin.py=0D #=0D 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=0D -os.system(pythontool + " " + splitFspBinPath + " rebase -f" + rebaseArgume= nts)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " rebase -f" + = rebaseArguments)=0D =0D #=0D # Split FSP bin to FSP-S/M/T segments=0D #=0D splitArguments =3D fspBinPath + os.sep + fspBinFileRebased + " -o " + fspB= inPath + " -n Fsp_Rebased.fd"=0D -os.system(pythontool + " " + splitFspBinPath + " split -f" + splitArgument= s)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " split -f" + s= plitArguments)=0D =0D #=0D # Patch dsc file with the re-based FSP-S/M/T address, so internally build = will use the same.=0D diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddres= s.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py index fb4cf4f9b7..b7e4bcf5f9 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py @@ -1,6 +1,6 @@ ## @ RebaseFspBinBaseAddress.py=0D #=0D -# Copyright (c) 2019, Intel Corporation. All rights reserved.
=0D +# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D =0D @@ -87,12 +87,12 @@ fspTBaseAddress =3D flashBase + fspTBaseOffset # Re-base FSP bin file to new address and save it as fspBinFileRebased usi= ng SplitFspBin.py=0D #=0D 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=0D -os.system(pythontool + " " + splitFspBinPath + " rebase -f" + rebaseArgume= nts)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " rebase -f" + = rebaseArguments)=0D =0D #=0D # Split FSP bin to FSP-S/M/T segments=0D #=0D splitArguments =3D fspBinPath + os.sep + fspBinFileRebased + " -o " + fspB= inPath + " -n Fsp_Rebased.fd"=0D -os.system(pythontool + " " + splitFspBinPath + " split -f" + splitArgument= s)=0D +os.system('"' + pythontool + '"' + " " + splitFspBinPath + " split -f" + s= plitArguments)=0D =0D exit(0)=0D --=20 2.27.0.windows.1