From nobody Sat May 4 15:36:21 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+95638+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+95638+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1666864483; cv=none; d=zohomail.com; s=zohoarc; b=HSWC/QK4+8nt5/OZttkk+FsZgLvmqUBM3jyQxYJ/yZPdDKa4Rt0tmdJmtyUp83UblSe+4HvPX2dT6kx/GgQeEWy5AoHHmdaFfZsJMq57MF8Kw9dUkABeLIc28IgrTkpxUWr82fDef1lcFnnXZayR0JZHqMgtWwSupCp45IEDm4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666864483; 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=D15+BMcKn/gw+8uz/0bIThlNrkU2Yxp3YWReoFK7FO0=; b=A1isfx57AG8/tOsL6yWxCaajt6gQsF4f/ii690biM3oNnzhdezjlsQjdDgNu2H/lGnAe7pxDD+tyfNLtJI8GXlwuWZbJoa8p3aK6ryTmraj8sEv8c0hs4rKzKUKeyy3rgrPLTdT00ndlDTCOnkNw8ukhV4Ky9mWpFPc47YCqQH0= 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+95638+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 1666864483691202.2735064543807; Thu, 27 Oct 2022 02:54:43 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mV01YY1788612xDqnS8V2Dgu; Thu, 27 Oct 2022 02:54:43 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.4622.1666864481812049893 for ; Thu, 27 Oct 2022 02:54:42 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="305794473" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="305794473" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2022 02:54:40 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="665621060" X-IronPort-AV: E=Sophos;i="5.95,217,1661842800"; d="scan'208";a="665621060" X-Received: from njayapra-mobl1.gar.corp.intel.com ([10.213.86.85]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2022 02:54:37 -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] edk2-libc: remove substring 368 from py uefi app name Date: Thu, 27 Oct 2022 15:23:19 +0530 Message-Id: <20221027095319.783-2-n.jayaprakash@intel.com> In-Reply-To: <20221027095319.783-1-n.jayaprakash@intel.com> References: <20221027095319.783-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: bSDP1zPJ3MJ3kivn1us8zV4Fx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1666864483; bh=BHGZ/9WzBOHUBWQMW562IM5lNjoj3oyrBHuzimwHbWA=; h=Cc:Date:From:Reply-To:Subject:To; b=wrzAffSdkKDzosnA5XaENVCYQRodXJnUV9oIH+aXptuvKjflBYTYcz5L/k8cig0QenP 3sCt5agVyS/FsSSW6YVIsjWcqrnRmIUCSsJ4yFvHU4tISXrQsHOaTJ1kFEvCIRUhZ+IcR EHspZGxDeyz5bDQvaWA3nImRPrUAyKn1UmI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1666864485212100002 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4124 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 Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jayaprakash N Reviewed-by: Michael D Kinney --- .../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 =3D> create_python_pkg.bat} | 78 +++++++++---------- ..._python368_pkg.sh =3D> create_python_pkg.sh} | 7 +- 5 files changed, 54 insertions(+), 57 deletions(-) rename AppPkg/Applications/Python/Python-3.6.8/{create_python368_pkg.bat = =3D> create_python_pkg.bat} (87%) rename AppPkg/Applications/Python/Python-3.6.8/{create_python368_pkg.sh = =3D> 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 ----------------------------------------------------- =20 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 /Ap= pPkg/Applications/Python/Python-3.6.8 folder. =20 Use the following commands to create Python UEFI package:: =20 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 =20 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 ne= eds to be created. =20 -When you run the create_python368_pkg.sh without any parameters it lists t= he help +When you run the create_python_pkg.sh without any parameters it lists the = help information as shown below: =20 Shell Script to create Python EFI Package. =20 -Usage: ./create_python368_pkg.sh +Usage: ./create_python_pkg.sh =20 Where * ToolChain : name of the tool chain such as GCC5 diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppP= kg/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: =20 - * \Efi\Tools receives a copy of Build/AppPkg/RELEASE_VS2017/X64/Python36= 8.efi. + * \Efi\Tools receives a copy of Build/AppPkg/RELEASE_VS2017/X64/Python.e= fi. ^^^^^^^^^^^^^^^^ Modify the host path to match your build type and compiler. =20 @@ -115,12 +115,12 @@ system as follows: the \Efi\StdLib\lib\python36.8\lib-dynload directory. This functional= ity is not yet implemented. =20 - A script, create_python368_pkg.bat , is provided which facilitates the p= opulation + A script, create_python_pkg.bat , is provided which facilitates the popu= lation of the target EFI package. Execute this script from within the AppPkg/Applications/Python/Python-3.6.8 directory, providing the Tool Ch= ain, Target Build and destination directory which is the path to the destination dir= ectory. =20 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 ^^^^^^^^^^^^^^ =20 copied into the specified destination directory. =20 @@ -130,10 +130,10 @@ system as follows: 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 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. =20 @@ -146,7 +146,7 @@ system as follows: =20 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 informatio= n. >>> 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 @@ =20 [Defines] INF_VERSION =3D 0x00010016 - BASE_NAME =3D Python368 + BASE_NAME =3D Python FILE_GUID =3D 9DA30E98-094C-4FF0-94CB-81C10E69F750 MODULE_TYPE =3D UEFI_APPLICATION VERSION_STRING =3D 0.1 diff --git a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.b= at 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 @@ =20 set TOOL_CHAIN_TAG=3D%1 set TARGET=3D%2 -set ARCH=3D%3 -set OUT_FOLDER=3D%4 +set ARCH=3D%3 +set OUT_FOLDER=3D%4 if "%TOOL_CHAIN_TAG%"=3D=3D"" goto usage if "%TARGET%"=3D=3D"" goto usage -if "%ARCH%"=3D=3D"" goto usage +if "%ARCH%"=3D=3D"" goto usage if "%OUT_FOLDER%"=3D=3D"" goto usage goto continue =20 :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 ins= tructions +echo Invalid command line arguments passed, please see the below usage ins= tructions echo. -echo "Usage: %0 " +echo "Usage: %0 " echo. -echo ToolChain =3D one of VS2013x86, VS2015x86, VS2017, VS2019 -echo Target =3D one of RELEASE, DEBUG -echo Architecture =3D one of IA32, X64 -echo OutFolder =3D Output directory for creating the package +echo ToolChain =3D one of VS2013x86, VS2015x86, VS2017, VS2019 +echo Target =3D one of RELEASE, DEBUG +echo Architecture =3D one of IA32, X64 +echo OutFolder =3D Output directory for creating the package echo. =20 goto :eof =20 :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 +) =20 -if not exist %OUT_FOLDER%\EFI\Tools ( - mkdir %OUT_FOLDER%\EFI\Tools -) -xcopy Build\AppPkg\%TARGET%_%TOOL_CHAIN_TAG%\%ARCH%\Python368.efi %OUT_FOL= DER%\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 =20 -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\StdL= ib\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\StdL= ib\lib\python36.8\ /Y /S /I +xcopy StdLib\Efi\StdLib\etc\* %OUT_FOLDER%\EFI\StdLib\etc\ /Y /S /I +echo. =20 -if not x%OUT_FOLDER::=3D%=3D=3Dx%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::=3D%=3D=3Dx%OUT_FOLDER% ( + echo Python EFI package available at %OUT_FOLDER% +) else ( + echo Python EFI package available at %CD%\%OUT_FOLDER% +) +goto all_done =20 -:error -echo Failed to Create Python EFI Package -echo Python368.efi is not available at Build\AppPkg\%TARGET%_%TOOL_CHAIN_T= AG%\%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 =20 -:all_done -exit /b %ERRORLEVEL% +:all_done +exit /b %ERRORLEVEL% diff --git a/AppPkg/Applications/Python/Python-3.6.8/create_python368_pkg.s= h 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 { =20 function error { echo Failed to Create Python EFI Package - echo Python368.efi application is not available at "Build/AppPkg/$TARG= ET"_"$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 interp= reter echo Then use this script to create a Python EFI package } @@ -60,7 +60,7 @@ then fi =20 cd ../../../../ -PYTHON_BIN=3D"Build/AppPkg/$TARGET"_"$TOOL_CHAIN_TAG/$ARCH/Python368.efi" +PYTHON_BIN=3D"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 - - - --=20 2.33.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 (#95638): https://edk2.groups.io/g/devel/message/95638 Mute This Topic: https://groups.io/mt/94600513/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-