From: "Jayaprakash, N" <n.jayaprakash@intel.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Rebecca Cran <rebecca@nuviainc.com>
Subject: Re: [edk2-libc Patch 1/1] edk2-libc: remove substring 368 from py uefi app name
Date: Mon, 31 Oct 2022 14:35:46 +0000 [thread overview]
Message-ID: <PH7PR11MB594390FBC33551C91422EA41EE379@PH7PR11MB5943.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CO1PR11MB4929B34AA0BF2BEDCD847D80D2339@CO1PR11MB4929.namprd11.prod.outlook.com>
Hi Mike,
Thanks for reviewing the PR😊
Could you merge this PR?
Regards,
JP
-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: 27 October 2022 21:25
To: Jayaprakash, N <n.jayaprakash@intel.com>; devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Rebecca Cran <rebecca@nuviainc.com>
Subject: RE: [edk2-libc Patch 1/1] edk2-libc: remove substring 368 from py uefi app name
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
> -----Original Message-----
> From: Jayaprakash, N <n.jayaprakash@intel.com>
> Sent: Thursday, October 27, 2022 2:53 AM
> To: devel@edk2.groups.io
> Cc: Rebecca Cran <rebecca@nuviainc.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Jayaprakash, N <n.jayaprakash@intel.com>
> Subject: [edk2-libc Patch 1/1] edk2-libc: remove substring 368 from py
> uefi app name
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4124
>
> This patch contains the changes to remove the substring
> 368 from the name of the python uefi interpreter app.
> With the changes in this patch the python interpreter app name will be
> changed from python368.efi to python.efi.
> This change was requested by chipsec team.
>
> Cc: Rebecca Cran <rebecca@nuviainc.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com>
> ---
> .../Python-3.6.8/GCCCompilationBKMs.rst | 10 +--
> .../Python/Python-3.6.8/Py368ReadMe.txt | 14 ++--
> .../Python/Python-3.6.8/Python368.inf | 2 +-
> ...ython368_pkg.bat => create_python_pkg.bat} | 78
> +++++++++---------- ..._python368_pkg.sh => create_python_pkg.sh} |
> 7 +-
> 5 files changed, 54 insertions(+), 57 deletions(-) rename
> AppPkg/Applications/Python/Python-3.6.8/{create_python368_pkg.bat =>
> create_python_pkg.bat} (87%) rename
> AppPkg/Applications/Python/Python-3.6.8/{create_python368_pkg.sh =>
> create_python_pkg.sh} (92%)
>
> diff --git
> a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst
> b/AppPkg/Applications/Python/Python-
> 3.6.8/GCCCompilationBKMs.rst
> index c72788f..525bef8 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst
> +++ b/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst
> @@ -167,24 +167,24 @@ Execute the below command to build the X64
> version of the Python 3.6.8 interpret
> -----------------------------------------------------
>
> To create an usable Python UEFI package with all the dependencies
> from the build environment, -you can use the bash shell script
> create_python368_pkg.sh available under
> /AppPkg/Applications/Python/Python-3.6.8
> +you can use the bash shell script create_python_pkg.sh available
> +under /AppPkg/Applications/Python/Python-3.6.8
> folder.
>
> Use the following commands to create Python UEFI package::
>
> bash$ cd ~/src/edk2/AppPkg/Applications/Python/Python-3.6.8/
> - bash$ chmod 777 create_python368_pkg.sh
> - ./create_python368_pkg.sh GCC5 RELEASE X64 myPyUEFI
> + bash$ chmod 777 create_python_pkg.sh
> + ./create_python_pkg.sh GCC5 RELEASE X64 myPyUEFI
>
> where GCC5 refers to the tool chain, RELEASE refers to the build
> type, X64 refers to the architecture myPyUEFI refers to the name of the folder where the Python UEFI package needs to be created.
>
> -When you run the create_python368_pkg.sh without any parameters it
> lists the help
> +When you run the create_python_pkg.sh without any parameters it lists
> +the help
> information as shown below:
>
> Shell Script to create Python EFI Package.
>
> -Usage: ./create_python368_pkg.sh <ToolChain> <Target> <Architecture>
> <OutFolder>
> +Usage: ./create_python_pkg.sh <ToolChain> <Target> <Architecture>
> +<OutFolder>
>
> Where
> * ToolChain : name of the tool chain such as GCC5
> diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> index 94dbccc..8c69210 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> @@ -98,7 +98,7 @@ target system.
> These directories, on the target system, are populated from the
> development system as follows:
>
> - * \Efi\Tools receives a copy of Build/AppPkg/RELEASE_VS2017/X64/Python368.efi.
> + * \Efi\Tools receives a copy of Build/AppPkg/RELEASE_VS2017/X64/Python.efi.
> ^^^^^^^^^^^^^^^^
> Modify the host path to match your build type and compiler.
>
> @@ -115,12 +115,12 @@ system as follows:
> the \Efi\StdLib\lib\python36.8\lib-dynload directory. This functionality is not
> yet implemented.
>
> - A script, create_python368_pkg.bat , is provided which facilitates
> the population
> + A script, create_python_pkg.bat , is provided which facilitates the
> + population
> of the target EFI package. Execute this script from within the
> AppPkg/Applications/Python/Python-3.6.8 directory, providing the Tool Chain, Target
> Build and destination directory which is the path to the destination directory.
> The appropriate contents of the
> AppPkg/Applications/Python/Python-3.6.8/Lib and
> - Python368.efi Application from Build/AppPkg/RELEASE_VS2017/X64/
> will be
> + Python.efi Application from Build/AppPkg/RELEASE_VS2017/X64/ will
> + be
> ^^^^^^^^^^^^^^
> copied into the specified destination directory.
>
> @@ -130,10 +130,10 @@ system as follows:
> 6. Example: Enabling socket support
> ===================================
> 1. enable {"_socket", init_socket}, in
> PyMod-3.6.8\Modules\config.c
> - 2. enable LibraryClasses BsdSocketLib and EfiSocketLib in Python368.inf.
> - 3. Build Python368
> + 2. enable LibraryClasses BsdSocketLib and EfiSocketLib in
> + Python368.inf 3. Build Python interpreter application using below
> + command
> build -a X64 -p AppPkg\AppPkg.dsc
> - 6. copy Build\AppPkg\RELEASE_VS2017\X64\Python368.efi to
> \Efi\Tools on your
> + 6. copy Build\AppPkg\RELEASE_VS2017\X64\Python.efi to \Efi\Tools
> + on your
> target system. Replace "RELEASE_VS2017", in the source path, with
> values appropriate for your tool chain.
>
> @@ -146,7 +146,7 @@ system as follows:
>
> EXAMPLE:
> Shell> fs0:
> - FS0:\> python368
> + FS0:\> python
> Python 3.6.8 (default, Jun 24 2015, 17:38:32) [C] on uefi
> Type "help", "copyright", "credits" or "license" for more information.
> >>> exit()
> diff --git a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> index 935f33b..a0257c5 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> +++ b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> @@ -14,7 +14,7 @@
>
> [Defines]
> INF_VERSION = 0x00010016
> - BASE_NAME = Python368
> + BASE_NAME = Python
> FILE_GUID = 9DA30E98-094C-4FF0-94CB-81C10E69F750
> MODULE_TYPE = UEFI_APPLICATION
> VERSION_STRING = 0.1
> diff --git
> a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.bat
> b/AppPkg/Applications/Python/Python-
> 3.6.8/create_python_pkg.bat
> similarity index 87%
> rename from
> AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.bat
> rename to
> AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.bat
> index 9b34717..32044d2 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.bat
> +++ b/AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.bat
> @@ -2,63 +2,63 @@
>
> set TOOL_CHAIN_TAG=%1
> set TARGET=%2
> -set ARCH=%3
> -set OUT_FOLDER=%4
> +set ARCH=%3
> +set OUT_FOLDER=%4
> if "%TOOL_CHAIN_TAG%"=="" goto usage
> if "%TARGET%"=="" goto usage
> -if "%ARCH%"=="" goto usage
> +if "%ARCH%"=="" goto usage
> if "%OUT_FOLDER%"=="" goto usage
> goto continue
>
> :usage
> echo.
> -echo Batch Script to create Python EFI Package.
> +echo Batch Script to create Python EFI Package.
> echo.
> -echo Invalid command line arguments passed, please see the below
> usage instructions
> +echo Invalid command line arguments passed, please see the below
> +usage instructions
> echo.
> -echo "Usage: %0 <ToolChain> <Target> <Architecture> <OutFolder>"
> +echo "Usage: %0 <ToolChain> <Target> <Architecture> <OutFolder>"
> echo.
> -echo ToolChain = one of VS2013x86, VS2015x86, VS2017, VS2019
> -echo Target = one of RELEASE, DEBUG
> -echo Architecture = one of IA32, X64
> -echo OutFolder = Output directory for creating the package
> +echo ToolChain = one of VS2013x86, VS2015x86, VS2017, VS2019
> +echo Target = one of RELEASE, DEBUG
> +echo Architecture = one of IA32, X64
> +echo OutFolder = Output directory for creating the package
> echo.
>
> goto :eof
>
> :continue
> cd ..\..\..\..\
> -if not exist Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\Python368.efi (
> - goto error
> -)
> +if not exist Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\Python.efi (
> + goto error
> +)
>
> -if not exist %OUT_FOLDER%\EFI\Tools (
> - mkdir %OUT_FOLDER%\EFI\Tools
> -)
> -xcopy Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\Python368.efi
> %OUT_FOLDER%\EFI\Tools\ /y
> +if not exist %OUT_FOLDER%\EFI\Tools (
> + mkdir %OUT_FOLDER%\EFI\Tools
> +)
> +xcopy Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\Python.efi
> +%OUT_FOLDER%\EFI\Tools\ /y
>
> -if not exist %OUT_FOLDER%\EFI\StdLib\lib\python36.8 (
> - mkdir %OUT_FOLDER%\EFI\StdLib\lib\python36.8
> -)
> -if not exist %OUT_FOLDER%\EFI\StdLib\etc (
> - mkdir %OUT_FOLDER%\EFI\StdLib\etc
> -)
> -xcopy AppPkg\Applications\Python\Python-3.6.8\Lib\* %OUT_FOLDER%\EFI\StdLib\lib\python36.8\ /Y /S /I
> -xcopy StdLib\Efi\StdLib\etc\* %OUT_FOLDER%\EFI\StdLib\etc\ /Y /S /I
> -echo.
> +if not exist %OUT_FOLDER%\EFI\StdLib\lib\python36.8 (
> + mkdir %OUT_FOLDER%\EFI\StdLib\lib\python36.8
> +)
> +if not exist %OUT_FOLDER%\EFI\StdLib\etc (
> + mkdir %OUT_FOLDER%\EFI\StdLib\etc
> +)
> +xcopy AppPkg\Applications\Python\Python-3.6.8\Lib\* %OUT_FOLDER%\EFI\StdLib\lib\python36.8\ /Y /S /I
> +xcopy StdLib\Efi\StdLib\etc\* %OUT_FOLDER%\EFI\StdLib\etc\ /Y /S /I
> +echo.
>
> -if not x%OUT_FOLDER::=%==x%OUT_FOLDER% (
> - echo Python EFI package available at %OUT_FOLDER%
> -) else (
> - echo Python EFI package available at %CD%\%OUT_FOLDER%
> -)
> -goto all_done
> +if not x%OUT_FOLDER::=%==x%OUT_FOLDER% (
> + echo Python EFI package available at %OUT_FOLDER%
> +) else (
> + echo Python EFI package available at %CD%\%OUT_FOLDER%
> +)
> +goto all_done
>
> -:error
> -echo Failed to Create Python EFI Package -echo Python368.efi is not
> available at Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\
> -echo Follow the instructions in Py368ReadMe.txt to build Python
> interpreter -echo Then use this script to create a Python EFI package
> +:error
> +echo Failed to Create Python EFI Package echo Python.efi is not
> +available at Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\
> +echo Follow the instructions in Py368ReadMe.txt to build Python
> +interpreter echo Then use this script to create a Python EFI package
>
> -:all_done
> -exit /b %ERRORLEVEL%
> +:all_done
> +exit /b %ERRORLEVEL%
> diff --git
> a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.sh
> b/AppPkg/Applications/Python/Python-
> 3.6.8/create_python_pkg.sh
> similarity index 92%
> rename from
> AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.sh
> rename to AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.sh
> index 87c49ad..4a3a1e5 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.sh
> +++ b/AppPkg/Applications/Python/Python-3.6.8/create_python_pkg.sh
> @@ -21,7 +21,7 @@ function usage {
>
> function error {
> echo Failed to Create Python EFI Package
> - echo Python368.efi application is not available at "Build/AppPkg/$TARGET"_"$TOOL_CHAIN_TAG/$ARCH/"
> + echo Python.efi application is not available at "Build/AppPkg/$TARGET"_"$TOOL_CHAIN_TAG/$ARCH/"
> echo Follow the instructions in Py368ReadMe.txt to build Python interpreter
> echo Then use this script to create a Python EFI package } @@
> -60,7 +60,7 @@ then fi
>
> cd ../../../../
> -PYTHON_BIN="Build/AppPkg/$TARGET"_"$TOOL_CHAIN_TAG/$ARCH/Python368.efi"
> +PYTHON_BIN="Build/AppPkg/$TARGET"_"$TOOL_CHAIN_TAG/$ARCH/Python.efi"
> if [ ! -f $PYTHON_BIN ]
> then
> error
> @@ -95,6 +95,3 @@ then
> else
> echo Python EFI package available at `pwd`/$OUT_FOLDER fi
> -
> -
> -
> --
> 2.33.0.windows.1
next prev parent reply other threads:[~2022-10-31 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 9:53 [edk2-libc Patch 0/1] edk2-libc - to remove substring 368 from python uefi app name Jayaprakash, N
2022-10-27 9:53 ` [edk2-libc Patch 1/1] edk2-libc: remove substring 368 from py " Jayaprakash, N
2022-10-27 15:55 ` Michael D Kinney
2022-10-31 14:35 ` Jayaprakash, N [this message]
2022-10-31 22:52 ` Michael D Kinney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH7PR11MB594390FBC33551C91422EA41EE379@PH7PR11MB5943.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox