UefiPayloadPkg: Fix incorrect code on Fit function.
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> Reviewed-by: Gua Guo <gua.guo@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
7e08d17a4a
commit
7ff6ab2b3e
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user