* [edk2-devel] [PATCH v1 1/1] UefiPayloadPkg: Fix incorrect code on Fit function.
2023-10-26 6:08 [edk2-devel] [PATCH v1 0/1] UefiPayloadPkg: Fix incorrect code on FIT function brucex.wang
@ 2023-10-26 6:08 ` brucex.wang
0 siblings, 0 replies; 2+ messages in thread
From: brucex.wang @ 2023-10-26 6:08 UTC (permalink / raw)
To: devel; +Cc: brucex.wang, Guo Dong, Sean Rhodes, James Lu, Gua Guo
From: "Brucex.Wang" <brucex.wang@intel.com>
1. MultiImage[Index] should be deleted if fv path of MultiImage[Index] not exist.
2. Remove redundant code.
Cc: Guo Dong <guo.dong@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: BruceX Wang <brucex.wang@intel.com>
---
UefiPayloadPkg/Tools/MkFitImage.py | 2 ++
UefiPayloadPkg/UniversalPayloadBuild.py | 10 ----------
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/UefiPayloadPkg/Tools/MkFitImage.py b/UefiPayloadPkg/Tools/MkFitImage.py
index 82ab933d6d..afa1630244 100644
--- a/UefiPayloadPkg/Tools/MkFitImage.py
+++ b/UefiPayloadPkg/Tools/MkFitImage.py
@@ -130,6 +130,8 @@ def BuildFitImage(Fdt, InfoHeader):
MultiImage[Index][-2] = BinaryData
MultiImage[Index][-1] = DataOffset
DataOffset += len (BinaryData)
+ else:
+ del MultiImage[Index]
libfdt.fdt_setprop_u32(Fdt, 0, 'size', DataOffset)
posix_time = int(time.time())
libfdt.fdt_setprop_u32(Fdt, 0, 'timestamp', posix_time)
diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py
index 6f57fa6df6..046c62e21c 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -146,16 +146,6 @@ def BuildUniversalPayload(Args):
ModuleReportPath = os.path.join(BuildDir, "UefiUniversalPayloadEntry.txt")
UpldInfoFile = os.path.join(BuildDir, "UniversalPayloadInfo.bin")
- if "CLANG_BIN" in os.environ:
- LlvmObjcopyPath = os.path.join(os.environ["CLANG_BIN"], "llvm-objcopy")
- else:
- LlvmObjcopyPath = "llvm-objcopy"
- try:
- RunCommand('"%s" --version'%LlvmObjcopyPath)
- except:
- print("- Failed - Please check if LLVM is installed or if CLANG_BIN is set correctly")
- sys.exit(1)
-
Pcds = ""
if (Args.pcd != None):
for PcdItem in Args.pcd:
--
2.39.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110110): https://edk2.groups.io/g/devel/message/110110
Mute This Topic: https://groups.io/mt/102201551/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] 2+ messages in thread