From: brucex.wang@intel.com
To: devel@edk2.groups.io
Cc: brucex.wang@intel.com, Guo Dong <guo.dong@intel.com>,
Sean Rhodes <sean@starlabs.systems>,
James Lu <james.lu@intel.com>, Gua Guo <gua.guo@intel.com>
Subject: [edk2-devel] [PATCH v1 1/1] UefiPayloadPkg: Fix incorrect code on Fit function.
Date: Thu, 26 Oct 2023 14:08:46 +0800 [thread overview]
Message-ID: <20231026060847.2168-2-brucex.wang@intel.com> (raw)
In-Reply-To: <20231026060847.2168-1-brucex.wang@intel.com>
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]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2023-10-26 14:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20231026060847.2168-2-brucex.wang@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