From nobody Fri Dec 19 19:00:45 2025 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+82956+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+82956+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1635602214; cv=none; d=zohomail.com; s=zohoarc; b=kp5URWFj6L/qKVyZeSaKZ/zCKRh4pJnLSfdtYXQAeu7gUsRP8dS+/lvhtYuQcUrEbzkjpkeQdVbpdcMAdbMWMvq/a3Mn75/gb/wtGajkX7EFzlc96Jov1IHAfFQutHyZdg7JNINhZb31U+6f5cA4ttUN7chQtIpFSccvAw0q/+4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1635602214; 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=pnPTetvIryR+xtLmAd8HRGiFqBgQcDE11iCewey3Q/8=; b=ViFWiISVsinX+8qipIEW8erZxLCzVc7eMTmtrSYudU2jiviWqlCcrjGePToR/ZzfYHLTdYs1bo5K4/4OJwQrFc3yhblOIQxhAJv084GvDIfKffTpcBTJxvTYm80MpCzirnMxl43rJlFeSLZluAzPT4mw3azf5rx6zYFZDtXJjyU= 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+82956+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 1635602214065334.37988639721004; Sat, 30 Oct 2021 06:56:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3FhbYY1788612xJ75TUCEEoT; Sat, 30 Oct 2021 06:56:53 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.19194.1635602212911293022 for ; Sat, 30 Oct 2021 06:56:53 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="317018180" X-IronPort-AV: E=Sophos;i="5.87,195,1631602800"; d="scan'208";a="317018180" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2021 06:56:51 -0700 X-IronPort-AV: E=Sophos;i="5.87,195,1631602800"; d="scan'208";a="499302333" X-Received: from ankitgo1-mobl.gar.corp.intel.com (HELO njayapra-MOBL1.gar.corp.intel.com) ([10.213.94.18]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2021 06:56:24 -0700 From: "Jayaprakash, N" To: devel@edk2.groups.io Cc: Rebecca Cran , Michael D Kinney , Jayaprakash N Subject: [edk2-devel] [edk2-libc Patch v3 2/5] AppPkg/Applications/Python: to remove document references to py2.7.2 Date: Sat, 30 Oct 2021 19:22:30 +0530 Message-Id: <20211030135233.1988-3-n.jayaprakash@intel.com> In-Reply-To: <20211030135233.1988-1-n.jayaprakash@intel.com> References: <20211030135233.1988-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: Wse0kqxe36h9Mmv90DfpJZusx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1635602213; bh=rFX1WhqM1w/8uV9vbPKbchaGzLyGq2HMLzHLiMkECI4=; h=Cc:Date:From:Reply-To:Subject:To; b=oFoD0WbekbinWPQebaHx39cjDHQSrQhC8giREBFyDePD0nIyuOXviSFW3W8sISpbsqB xF+D2meVmGRUeqjUO30I2gOtMLtc5I2ygtjz7Qk0crpJe6kUqQcbpxt3VB6BSXkvyWqu5 jBOnZfxEKC9x2h7qcRczsncXMLbbpKZ9qxA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1635602215585100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3589 This commit is to remove references to the py 2.7.2 UEFI port in all documents from edk2-libc repo. This python interpreter is no more supported on UEFI shell due to availability of py 3.6.8 on UEFI. Cc: Rebecca Cran Cc: Michael D Kinney Signed-off-by: Jayaprakash N --- AppPkg/Applications/Python/PythonReadMe.txt | 237 -------------------- AppPkg/ReadMe.txt | 22 +- Readme.md | 3 +- 3 files changed, 11 insertions(+), 251 deletions(-) delete mode 100644 AppPkg/Applications/Python/PythonReadMe.txt diff --git a/AppPkg/Applications/Python/PythonReadMe.txt b/AppPkg/Applicati= ons/Python/PythonReadMe.txt deleted file mode 100644 index c8cd503..0000000 --- a/AppPkg/Applications/Python/PythonReadMe.txt +++ /dev/null @@ -1,237 +0,0 @@ - EDK II Python - ReadMe - Version 2.7.2 - Release 1.02 - 18 Jan. 2013 - - -1. OVERVIEW -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -This document is devoted to general information on building and setup of t= he -Python environment for UEFI 2.3, the invocation of the interpreter, and th= ings -that make working with Python easier. - -It is assumed that you already have either UDK2010 or a current snapshot of -the EDK II sources from www.tianocore.org, and that you can successfully b= uild -packages within that distribution. - -2. Release Notes -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - 1) All C extension modules must be statically linked (built in) - 2) The site and os modules must exist as discrete files in ...\lib\pyth= on.27 - 3) User-specific configurations are not supported. - 4) Environment variables are not supported. - -3. Getting and Building Python -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D - 3.1 Getting Python - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - For development ease, a subset of the Python 2.7.2 distribution has been - included in the AppPkg source tree. If a full distribution is desired, = the - Python-2.7.2 directory can be removed or renamed and the full source code - downloaded from http://www.python.org/ftp/python/2.7.2/. - - A. Within your EDK II development tree, extract the Python distribution= into - AppPkg/Applications/Python. This should create the - AppPkg/Applications/Python/Python-2.7.2 directory. - - B. Copy the files from PyMod-2.7.2 into the corresponding directories w= ithin - the Python-2.7.2 tree. This will overwrite existing files with files - modified for UEFI usage. - - 3.2 Building Python - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - A. Edit Efi/config.c to enable the built-in modules you need. - Mandatory Built-in Modules: - edk2 errno imp marshal - - Additional built-in modules which are required to use the help() - functionality provided by PyDoc, are: - _codecs _collections _functools _random - _sre _struct _weakref binascii - cStringIO gc itertools math - operator time - - B. Edit AppPkg/AppPkg.dsc to enable (uncomment) the PythonCore.inf line - within the [Components] section. - - C. Build AppPkg, which includes Python, using the standard "build" comm= and: - For example, to build Python for an X64 CPU architecture: - build -a X64 -p AppPkg\AppPkg.dsc - -4. Python-related paths and files -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D -Python depends upon the existence of several directories and files on the -target system. - - \EFI Root of the UEFI system area. - |- \Tools Location of the Python.efi executable. - |- \Boot UEFI specified Boot directory. - |- \StdLib Root of the Standard Libraries sub-tre= e. - |- \etc Configuration files used by libraries. - |- \tmp Temporary files created by tmpfile(), = etc. - |- \lib Root of the libraries tree. - |- \python.27 Directory containing the Python library - | modules. - |- \lib-dynload Dynamically loadable Python extensions. - |- \site-packages Site-specific packages and modules. - - -5. Installing Python -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D -These directories, on the target system, are populated from the development -system as follows: - - * \Efi\Tools receives a copy of Build/AppPkg/DEBUG_VS2005/X64/Python.efi. - ^^^^^ ^^^^^^^^^^ - Modify the host path to match the your build type and compiler. - - * The \Efi\StdLib\etc directory is populated from the StdLib/Efi/StdLib/= etc - source directory. - - * Directory \Efi\StdLib\lib\python.27 is populated with packages and mod= ules - from the AppPkg/Applications/Python/Python-2.7.2/Lib directory. - The recommended minimum set of modules (.py, .pyc, and/or .pyo): - os stat ntpath warnings traceback - site types copy_reg linecache genericpath - - * Python C Extension Modules built as dynamically loadable extensions go= into - the \Efi\StdLib\lib\python.27\lib-dynload directory. This functionali= ty is - not yet implemented. - - -6. Example: Enabling socket support -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - 1. enable {"_socket", init_socket}, in Efi\config.c - 2. enable Python-2.7.2/Modules/socketmodule.c in PythonCore.inf. - 3. copy socket.py over to /Efi/StdLib/lib/python.27 on your target syst= em. - 4. Make sure dependent modules are present(.py) or built in(.c): - functools, types, os, sys, warnings, cStringIO, StringIO, errno - - 5. build -a X64 -p AppPkg\AppPkg.dsc - 6. copy Build\AppPkg\DEBUG_VS2005\X64\Python.efi to \Efi\Tools on your - target system. Replace "DEBUG_VS2005\X64", in the source path, with - values appropriate for your tool chain and processor architecture. - - -7. Running Python -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - Python must currently be run from an EFI FAT-32 partition, or volume, un= der - the UEFI Shell. At the Shell prompt enter the desired volume name, foll= owed - by a colon ':', then press Enter. Python can then be executed by typing= its - name, followed by any desired options and arguments. - - EXAMPLE: - 2.0 Shell> fs0: - 2.0 FS0:\> python - Python 2.7.2 (default, Oct 13 2015, 16:21:53) [C] on uefi - Type "help", "copyright", "credits" or "license" for more informatio= n. - >>> exit() - 2.0 FS0:\> - - NOTE: - Python, as distributed, sends its interactive prompts to stderr. If - STDERR isn't enabled in UEFI Setup so that it's output goes to the - console, it may appear that Python hangs on startup. If this happen= s, - one may be able to rectify the condition by typing "exit()" followed - by to exit out of Python. Then, type "exit" at the Shell pr= ompt - which should enter Setup where you can use the Boot Maintenance - Manager to modify your Console settings. - - NOTE: - Some platforms don't include the Setup utility, or don't allow STDER= R to - be modified. In these cases, Python may be started with the '-#' op= tion - which will cause stderr to be the same as stdout and should allow - Python to be used interactively on those platforms. - - Depending upon the version of Shell you are using, it may be necessa= ry - to escape the '#' character so that the Shell doesn't interpret it as - the start of a comment. The escape character is '^'. - Example: - python -^# -V - -8. Supported C Modules -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - Module Name C File(s) - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - _ast Python/Python-ast.c - _bisect Modules/_bisectmodule.c - _codecs Modules/_codecsmodule.c - _codecs_cn Modules/cjkcodecs/_codecs_cn.c - _codecs_hk Modules/cjkcodecs/_codecs_hk.c - _codecs_iso2022 Modules/cjkcodecs/_codecs_iso2022.c - _codecs_jp Modules/cjkcodecs/_codecs_jp - _codecs_kr Modules/cjkcodecs/_codecs_kr - _codecs_tw Modules/cjkcodecs/_codecs_tw - _collections Modules/_collectionsmodule.c - _csv Modules/_csv.c - _functools Modules/_functoolsmodule.c - _heapq Modules/_heapqmodule.c - _io Modules/_io/_iomodule.c Modules/_io/* - _json Modules/_json.c - _md5 Modules/md5module.c Modules/md5.c - _multibytecodec Modules/cjkcodecs/_multibytecodec.c - _random Modules/_randommodule.c - _sha Modules/shamodule.c - _sha256 Modules/sha256module.c - _sha512 Modules/sha512module.c - _socket Modules/socketmodule.c - _sre Modules/_sre.c - _struct Modules/_struct.c - _symtable Modules/symtablemodule.c - _weakref Modules/_weakref.c - array Modules/arraymodule.c - binascii Modules/binascii.c - cmath Modules/cmathmodule.c - cPickle Modules/cPickle.c - cStringIO Modules/cStringIO.c - datetime Modules/datetimemodule.c - edk2 Modules/Efi/edk2module.c - errno Modules/errnomodule.c - future_builtins Modules/future_builtins.c - gc Modules/gcmodule.c - imp Python/import.c - itertools Modules/itertoolsmodule.c - marshal Python/marshal.c - math Modules/mathmodule.c Modules/_math.c - operator Modules/operator.c - parser Modules/parsermodule.c - select Modules/selectmodule.c - signal Modules/signalmodule.c - strop Modules/stropmodule.c - time Modules/timemodule.c - xxsubtype Modules/xxsubtype.c - zipimport Modules/zipimport.c - zlib Modules/zlibmodule.c Modules/zlib/* - - -9. Tested Python Library Modules -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D -This is a partial list of the packages and modules of the Python Standard -Library that have been tested or used in some manner. - - encodings genericpath.py sha.py - importlib getopt.py SimpleHTTPServer.py - json hashlib.py site.py - pydoc_data heapq.py socket.py - xml HTMLParser.py SocketServer.py - abc.py inspect.py sre.py - argparse.py io.py sre_compile.py - ast.py keyword.py sre_constants.py - atexit.py linecache.py sre_parse.py - BaseHTTPServer.py locale.py stat.py - binhex.py md5.py string.py - bisect.py modulefinder.py StringIO.py - calendar.py ntpath.py struct.py - cmd.py numbers.py textwrap.py - codecs.py optparse.py token.py - collections.py os.py tokenize.py - copy.py platform.py traceback.py - copy_reg.py posixpath.py types.py - csv.py pydoc.py warnings.py - dummy_thread.py random.py weakref.py - fileinput.py re.py xmllib.py - formatter.py repr.py zipfile.py - functools.py runpy.py expat - -# # # diff --git a/AppPkg/ReadMe.txt b/AppPkg/ReadMe.txt index cee6493..4a2aee4 100644 --- a/AppPkg/ReadMe.txt +++ b/AppPkg/ReadMe.txt @@ -1,8 +1,8 @@ EADK EDK II Standard Libraries and Applications ReadMe - Version 1.02 - 21 Dec. 2012 + Version 1.03 + 18 Oct. 2021 =20 =20 OVERVIEW @@ -43,9 +43,9 @@ The EADK is comprised of three packages: Main This application is functionally identical to Hello, except= that it uses the Standard C Library to provide a main() entry po= int. =20 - Python A port of the Python-2.7.2 interpreter for UEFI. Building = this + Python A port of the Python-3.6.8 interpreter for UEFI. Building = this application is disabled by default. - See the PythonReadMe.txt file, in the Python directory, + See the Py368ReadMe.txt file, in the Python\Python-3.6.8 di= rectory, for information on configuring and building Python. =20 Lua A port of the Lua-5.2.3 interpreter for UEFI. This @@ -169,14 +169,12 @@ There are some boiler-plate declarations and definiti= ons that need to be included in your application's INF and DSC build files. These are describ= ed in the CONFIGURATION section, below. =20 -A subset of the Python 2.7.2 distribution is included as part of AppPkg. = If desired, -the full Python 2.7.2 distribution may be downloaded from python.org and u= sed instead. -Delete or rename the existing Python-2.7.2 directory then extract the down= loaded -Python-2.7.2.tgz file into the AppPkg\Applications\Python directory. This= will produce a -Python-2.7.2 directory containing the full Python distribution. Python fi= les that had to be -modified for EDK II are in the AppPkg\Applications\Python\PyMod-2.7.2 dire= ctory. These -files need to be copied into the corresponding directories within the extr= acted Python-2.7.2 -directory before Python can be built. +A full distribution of the Python 3.6.8 has been included as part of AppPk= g. But only +a subset of the features have been enabled for UEFI use case. Python files= that had to be +modified for EDK II are in the AppPkg\Applications\Python\Python-3.6.8\PyM= od-3.6.8 directory. +These files need to be copied into the corresponding directories within th= e Python-3.6.8 +directory before Python can be built. This can be achieved by running the = srcprep.py available=20 +under AppPkg\Applications\Python\Python-3.6.8. =20 =20 BUILDING diff --git a/Readme.md b/Readme.md index 0012cd5..f0e9501 100644 --- a/Readme.md +++ b/Readme.md @@ -21,8 +21,7 @@ git filter-branch -f --index-filter "git rm --ignore-unma= tch --cached -qr -- . & The majority of the content in the EDK II open source project uses a [BSD-2-Clause Plus Patent License](License.txt). The EDK II open source p= roject contains the following components that are covered by additional licenses: -* [AppPkg/Applications/Python/Python-2.7.2/Tools/pybench](AppPkg/Applicati= ons/Python/Python-2.7.2/Tools/pybench/LICENSE) -* [AppPkg/Applications/Python/Python-2.7.2](AppPkg/Applications/Python/Pyt= hon-2.7.2/LICENSE) + * [AppPkg/Applications/Python/Python-2.7.10](AppPkg/Applications/Python/Py= thon-2.7.10/LICENSE) * [AppPkg/Applications/Python/Python-3.6.8](AppPkg/Applications/Python/Pyt= hon-3.6.8/LICENSE) =20 --=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 (#82956): https://edk2.groups.io/g/devel/message/82956 Mute This Topic: https://groups.io/mt/86699007/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-