From nobody Sun May 19 12:26:25 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+75471+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+75471+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1621818030; cv=none; d=zohomail.com; s=zohoarc; b=V/81Z+hci0jbYbcY7M9xNWIy9/O+mzeTtAJ7V9zwqeyS+L0qLuitKrAy6CgC9YKCkV1qcF2nGSGO0VamYfCYFrFaOexWcgt43tdLl2hERD6EiS6pOOUkhSnENKMjmGEIkcm++tW1gBXfUo2isZamCe6ZrHYZO0l+EWP9VCw9LHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621818030; 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=BQhfDahpfxhppg7LOxEYaXv867DMam95eGJMJVkQg0I=; b=N2xwdeIYXvnPMGFORkj96AIRCGeXZYOWAWeaW4//rNHO34ZuPFW60MxuqfCdCzTDqTCkU3f+IvlDutlLDG56Jx8AP8HQhR2wDDy8X/6taBWdPtGjMRETzVHJvTckfMpOMuavGfTKhOxfQ6+UhZgnqczwTl0BGOu3Ex2Ht2/ydMU= 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+75471+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 1621818030149569.0299302713896; Sun, 23 May 2021 18:00:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id dZGBYY1788612xjxDVWmtdMD; Sun, 23 May 2021 18:00:29 -0700 X-Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web08.17234.1621818029044971005 for ; Sun, 23 May 2021 18:00:29 -0700 IronPort-SDR: mNNfP3QCwf9u/VTA6eTS6g0OdT63LcrmxDXPCz+giAq7ud03z7Nu88o3RYpEHRRwkuU19CcGDH r9cq0TNvI3MA== X-IronPort-AV: E=McAfee;i="6200,9189,9993"; a="188953940" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="188953940" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2021 18:00:27 -0700 IronPort-SDR: LRk/a8zr1LMLf+Fma9GgFtz+0/y2np1Re+v3gy3W0WaMdD5ruKUzZCo6gwYr4e0hpzyoL8yqzG Vwgi3v3ddS/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="545674513" X-Received: from ikuox-desk1.gar.corp.intel.com ([10.227.107.18]) by fmsmga001.fm.intel.com with ESMTP; 23 May 2021 18:00:26 -0700 From: "IanX Kuo" To: devel@edk2.groups.io Cc: ianx.kuo@intel.com, Chasel Chiu , Nate DeSimone Subject: [edk2-devel] [PATCH v2] MinPlatformPkg/Fsp: Rebase fail when python tools path exist whitespace Date: Mon, 24 May 2021 09:00:23 +0800 Message-Id: <7ba0ed4ad8bbeff173bfe767bb9525c21aca9da0.1621817960.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: 8bxBsyEyRcp3bB3Db3ufYPPVx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621818029; bh=rZu1OuZyOMAQLm0NZnIJx/peEIGh/tm3u6ZW3SWKttU=; h=Cc:Date:From:Reply-To:Subject:To; b=MP1AKjeXLuMCgCRdQpIXIniRqkGPRhtvNlzaiq8FuD2X15dFRpTMQKwebfh3sZ3FDEB DNx/2CG9mFphoviTRkv6dYbpj9P/a0dL1N81nAgV/t5p23VNXC2uFCSiIWKnXBk4cz+Dc uJvr1acSkNfUcHoykhQYvMcl6QOpC/WJnBk= 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 | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBa= seAddress.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBin= BaseAddress.py index 406e5ec130..a3d5263ad0 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseAndPatchFspBinBaseAddre= ss.py @@ -70,12 +70,16 @@ for line in flashmap.split("\n"): file.close() =20 # -# Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.p= y script=20 +# Get FSP-M Size, in order to calculate the FSP-T Base. Used SplitFspBin.p= y script # to dump the header, and get the ImageSize in FSP-M section # 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..50e442a500 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py @@ -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.27.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 (#75471): https://edk2.groups.io/g/devel/message/75471 Mute This Topic: https://groups.io/mt/83041135/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-