public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH v2 0/1] UefiPayloadPkg: Fix Add FV broken on fit format and remove clang dependency for version check
@ 2023-10-27 23:12 brucex.wang
  2023-10-27 23:12 ` [edk2-devel] [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function brucex.wang
  0 siblings, 1 reply; 3+ messages in thread
From: brucex.wang @ 2023-10-27 23:12 UTC (permalink / raw)
  To: devel; +Cc: brucex.wang, Gua Guo

From: Gua Guo <gua.guo@intel.com>

V2: Fix FIT Add FV failure broken.
V1: Remove clang dependency.

BruceX Wang (1):
  UefiPayloadPkg: Fix incorrect code on Fit function.

 UefiPayloadPkg/Tools/MkFitImage.py      |  7 ++++++-
 UefiPayloadPkg/UniversalPayloadBuild.py | 10 ----------
 2 files changed, 6 insertions(+), 11 deletions(-)

--
2.39.2.windows.1



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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [edk2-devel] [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function.
  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
  2023-10-27 23:17   ` Guo, Gua
  0 siblings, 1 reply; 3+ messages in thread
From: brucex.wang @ 2023-10-27 23:12 UTC (permalink / raw)
  To: devel; +Cc: brucex.wang, Guo Dong, Sean Rhodes, James Lu, Gua Guo

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH v2 1/1] UefiPayloadPkg: Fix incorrect code on Fit function.
  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
  0 siblings, 0 replies; 3+ messages in thread
From: Guo, Gua @ 2023-10-27 23:17 UTC (permalink / raw)
  To: Wang, BruceX, devel@edk2.groups.io; +Cc: Dong, Guo, Rhodes, Sean, Lu, James

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-28 18:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox