diff options
author | KasimX Liu <kasimx.liu@intel.com> | 2023-08-25 12:02:50 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-08-28 06:22:17 +0000 |
commit | 92006e5804a4adff05556a97a951fd7766a1d79f (patch) | |
tree | c2745da7b7968ccb9d3ee11c936a0f6ac165a0cb | |
parent | 819cfc6b42a68790a23509e4fcc58ceb70e1965e (diff) | |
download | edk2-92006e5804a4adff05556a97a951fd7766a1d79f.zip edk2-92006e5804a4adff05556a97a951fd7766a1d79f.tar.gz edk2-92006e5804a4adff05556a97a951fd7766a1d79f.tar.bz2 |
UefiPayloadPkg:Enhance the build processing for Universalpayload
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>
Reviewed-by: James Lu <james.lu@intel.com>
Reviewed-by: Gua Guo <gua.guo@intel.com>
Signed-off-by: KasimX Liu <kasimx.liu@intel.com>
-rw-r--r-- | UefiPayloadPkg/UniversalPayloadBuild.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py index ecc25da..47f37b3 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')
|