From nobody Tue Apr 30 04:48:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46030+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46030+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1566206635; cv=none; d=zoho.com; s=zohoarc; b=JA1GvHxRUthqv1xrWur1+xmx0+hdSKGY74jNRMTICeeQbTo8XYZ/5SgZrjW2CRNn5PkYcbMC+Gzq8t58Gy/hGPaoT2IgtJupU8aS6a0O2ZvrbURmgtsFQOrxx+s+fphUSaNIK7z3exx3X7SuXaHTbfKXD7ggqmiNcfYbmIjHndM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566206635; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=FM9YQMJCMBldf6njvW4DRfORQVkD+sDplqcUKm4WSuw=; b=eOmUTipK51513U85h7uPY+3N+oe4PvGzf+os861SGN3koP0VH+LOz/gCW1hM4KSS+2WgQBu8akz+2jgme0AvXtoLYDwSklI5y/cBTyfjHZ5oxSS3JfVRVlnYPozzEH+C6Z3m/jBjHFBCnW5Wc9MqufK+JERd6moMN5Ifi1MDi/g= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46030+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156620663580952.950371115171606; Mon, 19 Aug 2019 02:23:55 -0700 (PDT) Return-Path: X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Mon, 19 Aug 2019 02:23:54 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Aug 2019 02:23:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,403,1559545200"; d="scan'208";a="182815972" X-Received: from chingjex-mobl.gar.corp.intel.com ([10.5.246.20]) by orsmga006.jf.intel.com with ESMTP; 19 Aug 2019 02:23:52 -0700 From: "Cheng, Ching JenX" To: devel@edk2.groups.io Cc: Amy Chan , Michael Kubacki , Chasel Chiu , Nate DeSimone , Liming Gao Subject: [edk2-devel] [edk2-platforms: PATCH v2] Python run fail if env variable PYTHON_HOME is not set Date: Mon, 19 Aug 2019 17:24:13 +0800 Message-Id: <20190819092413.5752-1-ching.jenx.cheng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,ching.jenx.cheng@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566206635; bh=PNvHBjacX/D9MO5qao3DASJdnHl6J0MKucrlF4Cwlc8=; h=Cc:Date:From:Reply-To:Subject:To; b=Iaw4RJm1KUQNXeSdpWvOzHwZ2wrd4ulTY2P/Vtd0vcweTufXcgE7fnycxNs2e6ekP9s xHHsQJJe0Ev5SizKhvH56MeXlXIilJgyocKJa978zD6+HFpuHwTOmspSZn0PI+Ee1PaF2 doJ/h61NHwEJFU6S39zT2JQqSYAXxqLXeOU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2041 [PATCH v2] Update related files In Platform\Intel\MinPlatformPkg\Tools\Fsp\RebaseFspBinBaseAddress.py It will run another python code. But if the environment variable "PYTHON_HOME" is not exist and we didn't add any python's path to "PATH". It will cause error because python command not found. the error message as below: 'python' is not recognized as an internal or external command, operable program or batch file. So we set the python's path from which execute the python code if PYTHON_HOME was not exist. Cc: Amy Chan Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Signed-off-by: Ching JenX Cheng Reviewed-by: Chasel Chiu Reviewed-by: Michael Kubacki Reviewed-by: Nate DeSimone --- Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddres= s.py b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py index a8165b08e6..fb4cf4f9b7 100644 --- a/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py +++ b/Platform/Intel/MinPlatformPkg/Tools/Fsp/RebaseFspBinBaseAddress.py @@ -68,6 +68,8 @@ 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 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.21.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 (#46030): https://edk2.groups.io/g/devel/message/46030 Mute This Topic: https://groups.io/mt/32942124/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-