public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH v2] UefiPayloadPkg:Enhance the build processing for Universalpayload
@ 2023-08-25  9:27 kasimx.liu
  2023-08-25  9:57 ` Guo, Gua
  2023-08-25  9:59 ` Lu, James
  0 siblings, 2 replies; 4+ messages in thread
From: kasimx.liu @ 2023-08-25  9:27 UTC (permalink / raw)
  To: devel; +Cc: KasimX Liu, Guo Dong, Ray Ni, James Lu, Gua Guo

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 | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py
index ecc25dad83..47f37b3377 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -58,6 +58,7 @@ def BuildUniversalPayload(Args):
     BuildDir     = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/UefiPayloadPkgX64"))
     BuildModule = ""
     BuildArch = ""
+
     if Args.Arch == 'X64':
         BuildArch      = "X64"
         EntryOutputDir = os.path.join(BuildDir, "{}_{}".format (BuildTarget, ElfToolChain), os.path.normpath("X64/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry/DEBUG/UniversalPayloadEntry.dll"))
@@ -65,8 +66,6 @@ def BuildUniversalPayload(Args):
         BuildArch      = "IA32 -a X64"
         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)
     DscPath = os.path.normpath("UefiPayloadPkg/UefiPayloadPkg.dsc")
     ModuleReportPath = os.path.join(BuildDir, "UefiUniversalPayloadEntry.txt")
     UpldInfoFile = os.path.join(BuildDir, "UniversalPayloadInfo.bin")
@@ -99,6 +98,11 @@ def BuildUniversalPayload(Args):
         BuildModule += Pcds
         BuildModule += Defines
         RunCommand(BuildModule)
+
+    if Args.PreBuildUplBinary is not None:
+        EntryOutputDir = os.path.join(BuildDir, "UniversalPayload.elf")
+        shutil.copy (os.path.abspath(Args.PreBuildUplBinary), EntryOutputDir)
+
     #
     # Buid Universal Payload Information Section ".upld_info"
     #
@@ -122,7 +126,8 @@ def BuildUniversalPayload(Args):
         AddSectionName = '.upld_info'
         ReplaceFv (EntryOutputDir, UpldInfoFile, AddSectionName, Alignment = 4)
 
-    shutil.copy (EntryOutputDir, os.path.join(BuildDir, 'UniversalPayload.elf'))
+    if Args.PreBuildUplBinary is None:
+        shutil.copy (EntryOutputDir, os.path.join(BuildDir, 'UniversalPayload.elf'))
 
     return MultiFvList, os.path.join(BuildDir, 'UniversalPayload.elf')
 
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108038): https://edk2.groups.io/g/devel/message/108038
Mute This Topic: https://groups.io/mt/100952717/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] 4+ messages in thread
* [edk2-devel] [PATCH v2] UefiPayloadPkg:Enhance the build processing for Universalpayload
@ 2023-08-25  7:00 kasimx.liu
  0 siblings, 0 replies; 4+ messages in thread
From: kasimx.liu @ 2023-08-25  7:00 UTC (permalink / raw)
  To: devel; +Cc: KasimX Liu, Guo Dong, Ray Ni, James Lu, Gua Guo

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..3c3c27f58e 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("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 (#108037): https://edk2.groups.io/g/devel/message/108037
Mute This Topic: https://groups.io/mt/100952717/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] 4+ messages in thread

end of thread, other threads:[~2023-08-25 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25  9:27 [edk2-devel] [PATCH v2] UefiPayloadPkg:Enhance the build processing for Universalpayload kasimx.liu
2023-08-25  9:57 ` Guo, Gua
2023-08-25  9:59 ` Lu, James
  -- strict thread matches above, loose matches on Subject: below --
2023-08-25  7:00 kasimx.liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox