From: "Jayaprakash, N" <n.jayaprakash@intel.com>
To: devel@edk2.groups.io
Cc: Jayaprakash N <n.jayaprakash@intel.com>,
Rebecca Cran <rebecca@bsdio.com>,
Michael D Kinney <michael.d.kinney@intel.com>
Subject: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : make python368.inf compile conditionally in AppPkg.dsc
Date: Tue, 18 Jun 2024 12:16:10 +0530 [thread overview]
Message-ID: <20240618064850.883-2-n.jayaprakash@intel.com> (raw)
In-Reply-To: <20240618064850.883-1-n.jayaprakash@intel.com>
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]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-06-18 6:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-06-18 15:05 ` [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : " 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=20240618064850.883-2-n.jayaprakash@intel.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