* [edk2-devel] [edk2-libc Patch 0/1] make python368.inf compile conditionally in AppPkg.dsc @ 2024-06-18 6:46 Jayaprakash, N 2024-06-18 6:46 ` [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : " Jayaprakash, N 0 siblings, 1 reply; 3+ messages in thread From: Jayaprakash, N @ 2024-06-18 6:46 UTC (permalink / raw) To: devel; +Cc: Jayaprakash N This patch adds necessary changes to AppPkg.dsc file for conditional compilation of python368.inf. To enable compilation of python368.inf users need to pass an additional parameter to the build command as -D BUILD_PYTHON368. Also updated the Py368ReadMe.txt and the GCCCompilationBKMs.rst to include this additional information for building python368.inf. Please refer to BZ4789 for more details on the request. Jayaprakash N (1): edk2-libc : make python368.inf compile conditionally in AppPkg.dsc AppPkg/AppPkg.dsc | 9 ++++++--- .../Python/Python-3.6.8/GCCCompilationBKMs.rst | 6 ++---- AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt | 9 +++------ 3 files changed, 11 insertions(+), 13 deletions(-) -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119603): https://edk2.groups.io/g/devel/message/119603 Mute This Topic: https://groups.io/mt/106736572/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 3+ messages in thread
* [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : make python368.inf compile conditionally in AppPkg.dsc 2024-06-18 6:46 [edk2-devel] [edk2-libc Patch 0/1] make python368.inf compile conditionally in AppPkg.dsc Jayaprakash, N @ 2024-06-18 6:46 ` Jayaprakash, N 2024-06-18 15:05 ` Michael D Kinney 0 siblings, 1 reply; 3+ messages in thread From: Jayaprakash, N @ 2024-06-18 6:46 UTC (permalink / raw) To: devel; +Cc: Jayaprakash N, Rebecca Cran, Michael D Kinney REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4789 This commit adds necessary changes to AppPkg.dsc file for conditional compilation of python368.inf. To enable compilation of python368.inf users need to pass an additional parameter to the build command as -D BUILD_PYTHON368. Also updated the Py368ReadMe.txt and the GCCCompilationBKMs.rst to include this additional information for building python368.inf. Cc: Rebecca Cran <rebecca@bsdio.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jayaprakash N <n.jayaprakash@intel.com> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> --- AppPkg/AppPkg.dsc | 9 ++++++--- .../Python/Python-3.6.8/GCCCompilationBKMs.rst | 6 ++---- AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt | 9 +++------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/AppPkg/AppPkg.dsc b/AppPkg/AppPkg.dsc index e5a6c5e..89f9f1d 100644 --- a/AppPkg/AppPkg.dsc +++ b/AppPkg/AppPkg.dsc @@ -7,7 +7,7 @@ # for important information about configuring this package for your # environment. # -# Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR> +# Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.<BR> # SPDX-License-Identifier: BSD-2-Clause-Patent ## @@ -120,8 +120,11 @@ gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80400040 } -#### Un-comment the following line to build Python 3.6.8. -# AppPkg/Applications/Python/Python-3.6.8/Python368.inf +#### Conditional compilation of python368.inf by passing -D BUILD_PYTHON368 +#### through build command + !if $(BUILD_PYTHON368) + AppPkg/Applications/Python/Python-3.6.8/Python368.inf + !endif #### Un-comment the following line to build Lua. # AppPkg/Applications/Lua/Lua.inf diff --git a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst b/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst index 525bef8..0574977 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst +++ b/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst @@ -150,17 +150,15 @@ Copy the contents of edk2-libc to edk2 folder:: 2.5. Build Python Interpreter using GCC ---------------------------------------- -Uncomment the line containing following inf file name in AppPkg/AppPkg.dsc file -AppPkg/Applications/Python/Python-3.6.8/Python368.inf Execute the below command to build the X64 version of the Python 3.6.8 interpreter using GCC tool chain:: bash$ cd AppPkg/Applications/Python/Python-3.6.8/ bash$ python srcprep.py bash$ cd ~/src/edk2 - bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -m AppPkg/Applications/Python/Python-3.6.8/Python368.inf + bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -m AppPkg/Applications/Python/Python-3.6.8/Python368.inf -D BUILD_PYTHON368 or - bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc + bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -D BUILD_PYTHON368 2.5 Create Python UEFI package with all dependencies diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt index a6e65fe..5753443 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt @@ -68,12 +68,9 @@ and that you can successfully build packages within that distribution. gc itertools math _operator time - C. Edit AppPkg/AppPkg.dsc to enable (uncomment) the Python368.inf line - within the [Components] section. - - D. Build AppPkg using the standard "build" command: + C. Build AppPkg using the standard "build" command: For example, to build Python for an X64 CPU architecture: - build -a X64 -p AppPkg\AppPkg.dsc + build -a X64 -p AppPkg\AppPkg.dsc -D BUILD_PYTHON368 4. Python-related paths and files ================================= @@ -133,7 +130,7 @@ system as follows: 2. Uncomment BsdSocketLib and EfiSocketLib LibraryClasses in Python368.inf 3. Uncomment the statement #Modules/socketmodule.c in Python368.inf 4. Build Python interpreter application using below command - build -a X64 -p AppPkg\AppPkg.dsc + build -a X64 -p AppPkg\AppPkg.dsc -D BUILD_PYTHON368 5. 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. -- 2.45.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119604): https://edk2.groups.io/g/devel/message/119604 Mute This Topic: https://groups.io/mt/106736573/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : make python368.inf compile conditionally in AppPkg.dsc 2024-06-18 6:46 ` [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : " Jayaprakash, N @ 2024-06-18 15:05 ` Michael D Kinney 0 siblings, 0 replies; 3+ messages in thread From: Michael D Kinney @ 2024-06-18 15:05 UTC (permalink / raw) To: devel@edk2.groups.io, Jayaprakash, N; +Cc: Rebecca Cran, Kinney, Michael D Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Jayaprakash, N > Sent: Monday, June 17, 2024 11:46 PM > To: devel@edk2.groups.io > Cc: Jayaprakash, N <n.jayaprakash@intel.com>; Rebecca Cran > <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com> > Subject: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : make python368.inf > compile conditionally in AppPkg.dsc > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4789 > > This commit adds necessary changes to AppPkg.dsc file for > conditional compilation of python368.inf. To enable compilation > of python368.inf users need to pass an additional parameter > to the build command as -D BUILD_PYTHON368. > Also updated the Py368ReadMe.txt and the GCCCompilationBKMs.rst > to include this additional information for building python368.inf. > > Cc: Rebecca Cran <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > AppPkg/AppPkg.dsc | 9 ++++++--- > .../Python/Python-3.6.8/GCCCompilationBKMs.rst | 6 ++---- > AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt | 9 +++------ > 3 files changed, 11 insertions(+), 13 deletions(-) > > diff --git a/AppPkg/AppPkg.dsc b/AppPkg/AppPkg.dsc > index e5a6c5e..89f9f1d 100644 > --- a/AppPkg/AppPkg.dsc > +++ b/AppPkg/AppPkg.dsc > @@ -7,7 +7,7 @@ > # for important information about configuring this package for your > # environment. > # > -# Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.<BR> > +# Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.<BR> > # SPDX-License-Identifier: BSD-2-Clause-Patent > ## > > @@ -120,8 +120,11 @@ > gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80400040 > } > > -#### Un-comment the following line to build Python 3.6.8. > -# AppPkg/Applications/Python/Python-3.6.8/Python368.inf > +#### Conditional compilation of python368.inf by passing -D BUILD_PYTHON368 > +#### through build command > + !if $(BUILD_PYTHON368) > + AppPkg/Applications/Python/Python-3.6.8/Python368.inf > + !endif > > #### Un-comment the following line to build Lua. > # AppPkg/Applications/Lua/Lua.inf > diff --git a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst > b/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst > index 525bef8..0574977 100644 > --- a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst > +++ b/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst > @@ -150,17 +150,15 @@ Copy the contents of edk2-libc to edk2 folder:: > > 2.5. Build Python Interpreter using GCC > ---------------------------------------- > -Uncomment the line containing following inf file name in AppPkg/AppPkg.dsc > file > -AppPkg/Applications/Python/Python-3.6.8/Python368.inf > > Execute the below command to build the X64 version of the Python 3.6.8 > interpreter using GCC tool chain:: > > bash$ cd AppPkg/Applications/Python/Python-3.6.8/ > bash$ python srcprep.py > bash$ cd ~/src/edk2 > - bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -m > AppPkg/Applications/Python/Python-3.6.8/Python368.inf > + bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -m > AppPkg/Applications/Python/Python-3.6.8/Python368.inf -D BUILD_PYTHON368 > or > - bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc > + bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -D > BUILD_PYTHON368 > > > 2.5 Create Python UEFI package with all dependencies > diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > index a6e65fe..5753443 100644 > --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > @@ -68,12 +68,9 @@ and that you can successfully build packages within that > distribution. > gc itertools math _operator > time > > - C. Edit AppPkg/AppPkg.dsc to enable (uncomment) the Python368.inf line > - within the [Components] section. > - > - D. Build AppPkg using the standard "build" command: > + C. Build AppPkg using the standard "build" command: > For example, to build Python for an X64 CPU architecture: > - build -a X64 -p AppPkg\AppPkg.dsc > + build -a X64 -p AppPkg\AppPkg.dsc -D BUILD_PYTHON368 > > 4. Python-related paths and files > ================================= > @@ -133,7 +130,7 @@ system as follows: > 2. Uncomment BsdSocketLib and EfiSocketLib LibraryClasses in Python368.inf > 3. Uncomment the statement #Modules/socketmodule.c in Python368.inf > 4. Build Python interpreter application using below command > - build -a X64 -p AppPkg\AppPkg.dsc > + build -a X64 -p AppPkg\AppPkg.dsc -D BUILD_PYTHON368 > 5. 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. > -- > 2.45.1.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119610): https://edk2.groups.io/g/devel/message/119610 Mute This Topic: https://groups.io/mt/106736573/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-18 15:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-06-18 6:46 [edk2-devel] [edk2-libc Patch 0/1] make python368.inf compile conditionally in AppPkg.dsc Jayaprakash, N 2024-06-18 6:46 ` [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : " Jayaprakash, N 2024-06-18 15:05 ` Michael D Kinney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox