public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Guo, Gua" <gua.guo@intel.com>
To: "Wang, BruceX" <brucex.wang@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Dong, Guo" <guo.dong@intel.com>,
	"Rhodes, Sean" <sean@starlabs.systems>,
	"Lu, James" <james.lu@intel.com>
Subject: Re: [edk2-devel] [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function.
Date: Fri, 27 Oct 2023 23:17:15 +0000	[thread overview]
Message-ID: <BL1PR11MB54780DD98D46332F2425CDC7EFDCA@BL1PR11MB5478.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20231027231235.2043-2-brucex.wang@intel.com>

Reviewed-by: Gua Guo <gua.guo@intel.com>

-----Original Message-----
From: Wang, BruceX <brucex.wang@intel.com> 
Sent: Saturday, October 28, 2023 7:13 AM
To: devel@edk2.groups.io
Cc: Wang, BruceX <brucex.wang@intel.com>; Dong, Guo <guo.dong@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>
Subject: [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function.

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 (#110233): https://edk2.groups.io/g/devel/message/110233
Mute This Topic: https://groups.io/mt/102232380/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2023-10-27 23:17 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 ` [edk2-devel] [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function brucex.wang
2023-10-27 23:17   ` Guo, Gua [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=BL1PR11MB54780DD98D46332F2425CDC7EFDCA@BL1PR11MB5478.namprd11.prod.outlook.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