summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg/Tools/PatchFv.py
diff options
context:
space:
mode:
Diffstat (limited to 'IntelFsp2Pkg/Tools/PatchFv.py')
-rw-r--r--IntelFsp2Pkg/Tools/PatchFv.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
index eb130049b5..73ab877c71 100644
--- a/IntelFsp2Pkg/Tools/PatchFv.py
+++ b/IntelFsp2Pkg/Tools/PatchFv.py
@@ -166,6 +166,17 @@ class Symbols:
raise Exception ("'%s' is not a valid directory!" % fvDir)
#
+ # if user provided fd name as a input, skip rest of the flow to
+ # patch fd directly
+ #
+ fdFile = os.path.join(fvDir,fvNames + ".fd")
+ if os.path.exists(fdFile):
+ print("Tool identified Fd file as a input to patch '%s'" %fdFile)
+ self.fdFile = fdFile
+ self.fdSize = os.path.getsize(fdFile)
+ return 0
+
+ #
# If the Guid.xref is not existing in fvDir, then raise an exception
#
xrefFile = os.path.join(fvDir, "Guid.xref")
@@ -848,8 +859,9 @@ class Symbols:
# Print out the usage
#
def Usage():
- print ("PatchFv Version 0.50")
+ print ("PatchFv Version 0.60")
print ("Usage: \n\tPatchFv FvBuildDir [FvFileBaseNames:]FdFileBaseNameToPatch \"Offset, Value\"")
+ print ("\tPatchFv FdFileDir FdFileName \"Offset, Value\"")
def main():
#