From nobody Sun May 19 03:54:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75470+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75470+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1621816461; cv=none; d=zohomail.com; s=zohoarc; b=nE2MdVQ+KviMeP2VUhNJoPXUALP9ECYc+ni9LB0iPXWKLK1hOcEinOOAtDmz2ZdQ5OUilEzBMMLzXZQcnjdq6GOZq3IFyHOjr434ORa0f4rtKNK3akqQfbgdg7V7guj46HDqRIs0mtxdYVma3SSj1utIOf79Ib/GLwGuP+Jd2rI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621816461; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=9lhXOoAteSn8Oc/F2H2NMjWzbN0oLLHzCVQUkE6aOXc=; b=DN4DnBWd22TNEkwuUb18flMZZWzT8q6lJVmQNV52JIIPfi1iUWl9zEEZ+4y4omo16KEWeO3kQuknZbNcC+g7+Q6LBIIFyrpXn+LQC5LEeqQ8gx/QCpYcUnrNt2HPCSGYtAT8QQyjso8sjbrFI9adOtLVzm4rKhiCZMJLLDWhxxU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75470+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1621816461081815.279479179283; Sun, 23 May 2021 17:34:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id KOF6YY1788612xBInfaYd5Mi; Sun, 23 May 2021 17:34:20 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.16860.1621816454959648826 for ; Sun, 23 May 2021 17:34:15 -0700 IronPort-SDR: wgqmfKarN7I7xZnjyF6BUG44/sQMFRv8unZ7eE0tc1byJ07zSaf56peIK7HJ9U7wzVk7IqXxLz u9LG5AHalGHQ== X-IronPort-AV: E=McAfee;i="6200,9189,9993"; a="287391460" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="287391460" X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2021 17:34:12 -0700 IronPort-SDR: bNhSOMqAYjB/EoLTyg29crO9pLPkp1R7zsVuuUXitXJDIT2uqbgeEljRz/K7iPtQnChnXTGnPC rQA6O3mdg0QQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="463422110" X-Received: from ikuox-desk1.gar.corp.intel.com ([10.227.107.18]) by fmsmga004.fm.intel.com with ESMTP; 23 May 2021 17:34:11 -0700 From: "IanX Kuo" To: devel@edk2.groups.io Cc: IanX Kuo , Chasel Chiu , Nate DeSimone Subject: [edk2-devel] [PATCH v1] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace Date: Sun, 23 May 2021 17:34:01 -0700 Message-Id: <291a5618caf2b6de85721cdfe6ae0342bd571ec1.1621816349.git.ianx.kuo@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ianx.kuo@intel.com X-Gm-Message-State: aJ1rrytiHopT0DVebBjBCghXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621816460; bh=XVDzteNbU8qrADevNrhje1QOyjt+5bSnDuS9w1cd+Fg=; h=Cc:Date:From:Reply-To:Subject:To; b=HYREXR81wmi29cUzuR/pT6cKOqoaDCmRX9f8ARfXIbpsDWPF2FVHjrYIcgEGDh9wefB GJdokiQ438KKU7rsK52IXAm2/pHJrxcsPDlOxaPNIg/38lwY+v+yRl47gA/Jfh1rp8Ld+ JX9v3uQhRDIl8XEMSAgP0Ht93WOEqbg+JHY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBa= seAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBin= BaseAddress.py index 406e5ec130..de2d49d55e 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 # -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # =20 @@ -76,6 +76,10 @@ file.close() pythontool =3D 'python' if 'PYTHON_HOME' in os.environ: pythontool =3D os.environ['PYTHON_HOME'] + os.sep + 'python' +else: + pythontool =3D sys.executable +pythontool =3D "\"" + pythontool + "\"" + Process =3D subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fsp= BinFilePath], stdout=3Dsubprocess.PIPE) Output =3D Process.communicate()[0] FsptInfo =3D Output.rsplit(b"FSP_M", 1); diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddres= s.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py index fb4cf4f9b7..d9adb78ca2 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py @@ -1,6 +1,6 @@ ## @ RebaseFspBinBaseAddress.py # -# Copyright (c) 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # =20 @@ -70,6 +70,8 @@ if 'PYTHON_HOME' in os.environ: pythontool =3D os.environ['PYTHON_HOME'] + os.sep + 'python' else: pythontool =3D sys.executable +pythontool =3D "\"" + pythontool + "\"" + Process =3D subprocess.Popen([pythontool, splitFspBinPath, "info","-f",fsp= BinFilePath], stdout=3Dsubprocess.PIPE) Output =3D Process.communicate()[0] FsptInfo =3D Output.rsplit(b"FSP_M", 1); --=20 2.30.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75470): https://edk2.groups.io/g/devel/message/75470 Mute This Topic: https://groups.io/mt/83040666/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-