public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: kasimx.liu@intel.com
To: devel@edk2.groups.io
Cc: KasimX Liu <kasimx.liu@intel.com>, Guo Dong <guo.dong@intel.com>,
	Ray Ni <ray.ni@intel.com>, James Lu <james.lu@intel.com>,
	Gua Guo <gua.guo@intel.com>
Subject: [edk2-devel] [PATCH] UefiPayloadPkg:Enhance the build processing for Universalpayload
Date: Fri, 25 Aug 2023 12:07:42 +0800	[thread overview]
Message-ID: <48ac1b3039e1115731598e3f48ab643daf69a537.1692936275.git.kasimx.liu@intel.com> (raw)

From: KasimX Liu <kasimx.liu@intel.com>

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4532

To Copy the PrebuildUplBinary to Build folder then add/replace Fvs.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: KasimX Liu <kasimx.liu@intel.com>
---
 UefiPayloadPkg/UniversalPayloadBuild.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py
index ecc25dad83..6c6c37b3ca 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -58,6 +58,8 @@ def BuildUniversalPayload(Args):
     BuildDir     = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/UefiPayloadPkgX64"))
     BuildModule = ""
     BuildArch = ""
+    PreBuildUplOutput = os.path.join(BuildDir, os.path.normpath("UefiPayloadBinPkg/Binaries"))
+
     if Args.Arch == 'X64':
         BuildArch      = "X64"
         EntryOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, ElfToolChain), os.path.normpath("X64/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry/DEBUG/UniversalPayloadEntry.dll"))
@@ -66,7 +68,11 @@ def BuildUniversalPayload(Args):
         EntryOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, ElfToolChain), os.path.normpath("IA32/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry/DEBUG/UniversalPayloadEntry.dll"))
 
     if Args.PreBuildUplBinary is not None:
-        EntryOutputDir = os.path.abspath(Args.PreBuildUplBinary)
+        if os.path.exists(PreBuildUplOutput) != True:
+            os.makedirs(PreBuildUplOutput)
+        EntryOutputDir = os.path.join(BuildDir, PreBuildUplOutput, "UniversalPayload.elf")
+        shutil.copy (os.path.abspath(Args.PreBuildUplBinary), EntryOutputDir)
+
     DscPath = os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc")
     ModuleReportPath = os.path.join(BuildDir, "UefiUniversalPayloadEntry.txt")
     UpldInfoFile = os.path.join(BuildDir, "UniversalPayloadInfo.bin")
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108030): https://edk2.groups.io/g/devel/message/108030
Mute This Topic: https://groups.io/mt/100950168/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



                 reply	other threads:[~2023-08-25  4:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=48ac1b3039e1115731598e3f48ab643daf69a537.1692936275.git.kasimx.liu@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