public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
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 v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function.
Date: Sat, 28 Oct 2023 07:12:35 +0800	[thread overview]
Message-ID: <20231027231235.2043-2-brucex.wang@intel.com> (raw)
In-Reply-To: <20231027231235.2043-1-brucex.wang@intel.com>

From: BruceX Wang <brucex.wang@intel.com>

1. Add firmware volume need to check firmware volume exist or not.
2. Remove clang version check dependency.

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      |  7 ++++++-
 UefiPayloadPkg/UniversalPayloadBuild.py | 10 ----------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/UefiPayloadPkg/Tools/MkFitImage.py b/UefiPayloadPkg/Tools/MkFitImage.py
index 82ab933d6d..41a259960b 100644
--- a/UefiPayloadPkg/Tools/MkFitImage.py
+++ b/UefiPayloadPkg/Tools/MkFitImage.py
@@ -10,6 +10,7 @@ from os.path import exists
 import libfdt
 from ctypes import *
 import time
+import os
 
 class FIT_IMAGE_INFO_HEADER:
     """Class for user setting data to use MakeFitImage()
@@ -139,6 +140,8 @@ def BuildFitImage(Fdt, InfoHeader):
     ImageNode = libfdt.fdt_add_subnode(Fdt, 0, 'images')
     for Item in reversed (MultiImage):
         Name, Path, BuildFvNode, Description, BinaryData, DataOffset = Item
+        if os.path.exists (Item[1]) == False:
+            continue
         FvNode = libfdt.fdt_add_subnode(Fdt, ImageNode, Name)
         BuildFvNode (Fdt, InfoHeader, FvNode, DataOffset, len(BinaryData), Description)
 
@@ -149,7 +152,9 @@ def BuildFitImage(Fdt, InfoHeader):
     DtbFile.truncate()
     DtbFile.write(Fdt)
     for Item in MultiImage:
-        _, _, _, _, BinaryData, _ = Item
+        _, FilePath, _, _, BinaryData, _ = Item
+        if os.path.exists (Item[1]) == False:
+            continue
         DtbFile.write(BinaryData)
     DtbFile.close()
 
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.2.windows.1



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



  reply	other threads:[~2023-10-28 18:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 23:12 [edk2-devel] [PATCH v2 0/1] UefiPayloadPkg: Fix Add FV broken on fit format and remove clang dependency for version check brucex.wang
2023-10-27 23:12 ` brucex.wang [this message]
2023-10-27 23:17   ` [edk2-devel] [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function Guo, Gua

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=20231027231235.2043-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