From nobody Wed May 8 19:26:48 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+80665+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+80665+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1631633603; cv=none; d=zohomail.com; s=zohoarc; b=UPbt0bZgXJ0aaGKyMYmUSWwpQAM8UgGxIdC3VeSS/3OOJ+cD7czcYd1vhi2E2zrQxq8h2BeYNCkvjmnLZxQjs5oHqRy+IqkrAuuWBlSFLQfOR1rgDex0u04YDjI0HGEwnbfUE2qAnCduSy4WPgszULSb9UFQLC/2rxcFh1GNcgs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1631633603; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=pfAsZ5F52P9BH5oPSES/3graBxVlTMoETZoyaBZx/MA=; b=Ny5jEatA54FAnyQlevSrxb6ojcT0uOxDkhxgyGJxsBZYENV/WT2EHWjs9UyMmaqtNxRAs7d27neapiHNf+z5R9D4HFG5lCjRszTEpdUHeopmihTh8Jobq11fD+6YM2TdM6YesQtEXgbioqPdqv/48SiWfWK+it0cFmwjlVrJItw= 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+80665+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1631633603076386.69925647883656; Tue, 14 Sep 2021 08:33:23 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id PmAqYY1788612xFQMPg13MGX; Tue, 14 Sep 2021 08:33:22 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.12002.1631633595967062292 for ; Tue, 14 Sep 2021 08:33:22 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10106"; a="201542625" X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="201542625" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2021 08:28:42 -0700 X-IronPort-AV: E=Sophos;i="5.85,292,1624345200"; d="scan'208";a="697702355" X-Received: from njayapra-mobl1.gar.corp.intel.com ([10.215.193.59]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2021 08:28:41 -0700 From: "Jayaprakash, N" To: devel@edk2.groups.io Cc: Rebecca Cran , Michael D Kinney , Jayaprakash N Subject: [edk2-devel] [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8 Date: Tue, 14 Sep 2021 20:58:24 +0530 Message-Id: <20210914152824.2566-2-n.jayaprakash@intel.com> In-Reply-To: <20210914152824.2566-1-n.jayaprakash@intel.com> References: <20210914152824.2566-1-n.jayaprakash@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,n.jayaprakash@intel.com X-Gm-Message-State: UEbeczqEJg50NgkLXyRiTugPx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1631633602; bh=cRpsZov9ejtg3JsalxbojJmhWdyuNq3ok6be6VF8PnQ=; h=Cc:Date:From:Reply-To:Subject:To; b=KIecWv6EnGlUkNYH2THTUvi34/K7lKoBncreHAmk+VkKvYA7SzqEOOfg+w6BGMq/CRA B3nLoElJH3duSFDWs9V8D11F0EI5FUi8ZJ3xepN6gwoxzCI/cpKq1GdZDUtHMQV9ziq+M c1RAxWZ6V50Q0vgHLGkPLidZxTNkhbBZHOc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1631633609102100002 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3626 This commit adds support for the atexit a builtin module in standard python 3.6.8 to it's UEFI port. There are tools like Chipsec which are dependent on it but it can be used by other python scripts running on UEFI shell with the help of py 3.6.8 interpreter. Tested the changes on IA32 and X64 emulators and it is working good. Cc: Rebecca Cran Cc: Michael D Kinney Signed-off-by: Jayaprakash N Reviewed-by: Rebecca Cran --- AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt | 1 + .../Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c | 2 ++ AppPkg/Applications/Python/Python-3.6.8/Python368.inf | 1 + 3 files changed, 4 insertions(+) diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppP= kg/Applications/Python/Python-3.6.8/Py368ReadMe.txt index 69bb6bd..fb81228 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt @@ -175,6 +175,7 @@ system as follows: _symtable Modules/symtablemodule.c _weakref Modules/_weakref.c array Modules/arraymodule.c + atexit Modules/atexitmodule.c binascii Modules/binascii.c cmath Modules/cmathmodule.c datetime Modules/_datetimemodule.c diff --git a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/co= nfig.c b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config= .c index 4b1eb0f..5ee42d8 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c +++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c @@ -65,6 +65,7 @@ extern PyObject* PyInit__weakref(void); extern PyObject* init_winreg(void); extern PyObject* PyInit_zlib(void); extern PyObject* initbz2(void); +extern PyObject* PyInit_atexit(void); =20 extern PyObject* PyMarshal_Init(void); extern PyObject* _PyWarnings_Init(void); @@ -111,6 +112,7 @@ struct _inittab _PyImport_Inittab[] =3D { {"gc", PyInit_gc}, {"math", PyInit_math}, {"array", PyInit_array}, + {"atexit", PyInit_atexit}, {"_datetime", PyInit__datetime}, {"parser", PyInit_parser}, {"pyexpat", PyInit_pyexpat}, diff --git a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf b/AppPkg= /Applications/Python/Python-3.6.8/Python368.inf index d2e6e73..b98b4a7 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf +++ b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf @@ -215,6 +215,7 @@ Modules/_io/iobase.c # Modules/_io/stringio.c # Modules/_io/textio.c # + Modules/atexitmodule.c # =20 #Modules/cjkcodecs Modules/cjkcodecs/multibytecodec.c # --=20 2.32.0.windows.2 -=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 (#80665): https://edk2.groups.io/g/devel/message/80665 Mute This Topic: https://groups.io/mt/85604940/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-