BaseTools: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# name value pair
|
||||
#
|
||||
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -25,4 +25,4 @@ class Attribute:
|
||||
# @param self The object pointer
|
||||
def __init__(self):
|
||||
self.Name = None
|
||||
self.Value = None
|
||||
self.Value = None
|
||||
|
@@ -205,7 +205,7 @@ class Capsule (CapsuleClassObject) :
|
||||
return GenFds.ImageBinDict[self.UiCapsuleName.upper() + 'cap']
|
||||
|
||||
GenFdsGlobalVariable.InfLogger( "\nGenerate %s Capsule" %self.UiCapsuleName)
|
||||
if ('CAPSULE_GUID' in self.TokensDict and
|
||||
if ('CAPSULE_GUID' in self.TokensDict and
|
||||
uuid.UUID(self.TokensDict['CAPSULE_GUID']) == uuid.UUID('6DCBD5ED-E82D-4C44-BDA1-7194199AD92A')):
|
||||
return self.GenFmpCapsule()
|
||||
|
||||
|
@@ -32,13 +32,13 @@ class CapsuleData:
|
||||
# @param self The object pointer
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
|
||||
## generate capsule data
|
||||
#
|
||||
# @param self The object pointer
|
||||
def GenCapsuleSubItem(self):
|
||||
pass
|
||||
|
||||
|
||||
## FFS class for capsule data
|
||||
#
|
||||
#
|
||||
@@ -119,7 +119,7 @@ class CapsuleFd (CapsuleData):
|
||||
else:
|
||||
FdFile = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FdName)
|
||||
return FdFile
|
||||
|
||||
|
||||
## AnyFile class for capsule data
|
||||
#
|
||||
#
|
||||
@@ -139,7 +139,7 @@ class CapsuleAnyFile (CapsuleData):
|
||||
#
|
||||
def GenCapsuleSubItem(self):
|
||||
return self.FileName
|
||||
|
||||
|
||||
## Afile class for capsule data
|
||||
#
|
||||
#
|
||||
@@ -208,11 +208,11 @@ class CapsulePayload(CapsuleData):
|
||||
Guid = self.ImageTypeId.split('-')
|
||||
Buffer = pack('=ILHHBBBBBBBBBBBBIIQ',
|
||||
int(self.Version, 16),
|
||||
int(Guid[0], 16),
|
||||
int(Guid[1], 16),
|
||||
int(Guid[2], 16),
|
||||
int(Guid[3][-4:-2], 16),
|
||||
int(Guid[3][-2:], 16),
|
||||
int(Guid[0], 16),
|
||||
int(Guid[1], 16),
|
||||
int(Guid[2], 16),
|
||||
int(Guid[3][-4:-2], 16),
|
||||
int(Guid[3][-2:], 16),
|
||||
int(Guid[4][-12:-10], 16),
|
||||
int(Guid[4][-10:-8], 16),
|
||||
int(Guid[4][-8:-6], 16),
|
||||
|
@@ -55,7 +55,7 @@ class EfiSection (EfiSectionClassObject):
|
||||
# @retval tuple (Generated file name list, section alignment)
|
||||
#
|
||||
def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf = None, Dict = {}, IsMakefile = False) :
|
||||
|
||||
|
||||
if self.FileName is not None and self.FileName.startswith('PCD('):
|
||||
self.FileName = GenFdsGlobalVariable.GetPcdValue(self.FileName)
|
||||
"""Prepare the parameter of GenSection"""
|
||||
@@ -155,7 +155,7 @@ class EfiSection (EfiSectionClassObject):
|
||||
BuildNumTuple = tuple()
|
||||
BuildNumString = ' ' + ' '.join(BuildNumTuple)
|
||||
|
||||
#if VerString == '' and
|
||||
#if VerString == '' and
|
||||
if BuildNumString == '':
|
||||
if self.Optional == True :
|
||||
GenFdsGlobalVariable.VerboseLogger( "Optional Section don't exist!")
|
||||
@@ -240,7 +240,7 @@ class EfiSection (EfiSectionClassObject):
|
||||
Num = '%s.%d' %(SecNum, Index)
|
||||
OutputFile = os.path.join( OutputPath, ModuleName + SUP_MODULE_SEC + Num + Ffs.SectionSuffix.get(SectionType))
|
||||
File = GenFdsGlobalVariable.MacroExtend(File, Dict)
|
||||
|
||||
|
||||
#Get PE Section alignment when align is set to AUTO
|
||||
if self.Alignment == 'Auto' and (SectionType == BINARY_FILE_TYPE_PE32 or SectionType == BINARY_FILE_TYPE_TE):
|
||||
ImageObj = PeImageClass (File)
|
||||
@@ -284,7 +284,7 @@ class EfiSection (EfiSectionClassObject):
|
||||
IsMakefile = IsMakefile
|
||||
)
|
||||
File = StrippedFile
|
||||
|
||||
|
||||
"""For TE Section call GenFw to generate TE image"""
|
||||
|
||||
if SectionType == BINARY_FILE_TYPE_TE:
|
||||
|
@@ -103,7 +103,7 @@ class FD(FDClassObject):
|
||||
pass
|
||||
GenFdsGlobalVariable.VerboseLogger('Call each region\'s AddToBuffer function')
|
||||
RegionObj.AddToBuffer (TempFdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFds.ImageBinDict, self.vtfRawDict, self.DefineVarDict)
|
||||
|
||||
|
||||
FdBuffer = BytesIO('')
|
||||
PreviousRegionStart = -1
|
||||
PreviousRegionSize = 1
|
||||
|
@@ -173,7 +173,7 @@ class IncludeFileProfile :
|
||||
self.InsertAdjust = 0
|
||||
self.IncludeFileList = []
|
||||
self.Level = 1 # first level include file
|
||||
|
||||
|
||||
def GetTotalLines(self):
|
||||
TotalLines = self.InsertAdjust + len(self.FileLinesList)
|
||||
|
||||
@@ -191,7 +191,7 @@ class IncludeFileProfile :
|
||||
def GetLineInFile(self, Line):
|
||||
if not self.IsLineInFile (Line):
|
||||
return (self.FileName, -1)
|
||||
|
||||
|
||||
InsertedLines = self.InsertStartLineNumber
|
||||
|
||||
for Profile in self.IncludeFileList:
|
||||
@@ -233,7 +233,7 @@ class FileProfile :
|
||||
# ECC will use this Dict and List information
|
||||
self.PcdFileLineDict = {}
|
||||
self.InfFileLineList = []
|
||||
|
||||
|
||||
self.FdDict = {}
|
||||
self.FdNameNotSet = False
|
||||
self.FvDict = {}
|
||||
@@ -339,11 +339,11 @@ class FdfParser:
|
||||
#
|
||||
# @param self The object pointer
|
||||
# @param DestLine Optional new destination line number.
|
||||
# @param DestOffset Optional new destination offset.
|
||||
# @param DestOffset Optional new destination offset.
|
||||
#
|
||||
def Rewind(self, DestLine = 1, DestOffset = 0):
|
||||
self.CurrentLineNumber = DestLine
|
||||
self.CurrentOffsetWithinLine = DestOffset
|
||||
def Rewind(self, DestLine = 1, DestOffset = 0):
|
||||
self.CurrentLineNumber = DestLine
|
||||
self.CurrentOffsetWithinLine = DestOffset
|
||||
|
||||
## __UndoOneChar() method
|
||||
#
|
||||
@@ -459,7 +459,7 @@ class FdfParser:
|
||||
if MacroName.startswith('!'):
|
||||
NotFlag = True
|
||||
MacroName = MacroName[1:].strip()
|
||||
|
||||
|
||||
if not MacroName.startswith('$(') or not MacroName.endswith(')'):
|
||||
raise Warning("Macro name expected(Please use '$(%(Token)s)' if '%(Token)s' is a macro.)" % {"Token" : MacroName},
|
||||
self.FileName, self.CurrentLineNumber)
|
||||
@@ -599,7 +599,7 @@ class FdfParser:
|
||||
# @param self The object pointer
|
||||
#
|
||||
def PreprocessIncludeFile(self):
|
||||
# nested include support
|
||||
# nested include support
|
||||
Processed = False
|
||||
MacroDict = {}
|
||||
while self.__GetNextToken():
|
||||
@@ -664,7 +664,7 @@ class FdfParser:
|
||||
IncludedFile1 = PathClass(IncludedFile, GlobalData.gWorkspace)
|
||||
ErrorCode = IncludedFile1.Validate()[0]
|
||||
if ErrorCode != 0:
|
||||
raise Warning("The include file does not exist under below directories: \n%s\n%s\n%s\n"%(os.path.dirname(self.FileName), PlatformDir, GlobalData.gWorkspace),
|
||||
raise Warning("The include file does not exist under below directories: \n%s\n%s\n%s\n"%(os.path.dirname(self.FileName), PlatformDir, GlobalData.gWorkspace),
|
||||
self.FileName, self.CurrentLineNumber)
|
||||
|
||||
if not IsValidInclude (IncludedFile1.Path, self.CurrentLineNumber):
|
||||
@@ -707,18 +707,18 @@ class FdfParser:
|
||||
Processed = False
|
||||
# Preprocess done.
|
||||
self.Rewind()
|
||||
|
||||
|
||||
@staticmethod
|
||||
def __GetIfListCurrentItemStat(IfList):
|
||||
if len(IfList) == 0:
|
||||
return True
|
||||
|
||||
|
||||
for Item in IfList:
|
||||
if Item[1] == False:
|
||||
return False
|
||||
|
||||
|
||||
return True
|
||||
|
||||
|
||||
## PreprocessConditionalStatement() method
|
||||
#
|
||||
# Preprocess conditional statement.
|
||||
@@ -778,7 +778,7 @@ class FdfParser:
|
||||
Macro = self.__Token
|
||||
if not self.__IsToken( "="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
Value = self.__GetExpression()
|
||||
self.__SetMacroValue(Macro, Value)
|
||||
self.__WipeOffArea.append(((DefineLine, DefineOffset), (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
|
||||
@@ -808,7 +808,7 @@ class FdfParser:
|
||||
|
||||
CondLabel = self.__Token
|
||||
Expression = self.__GetExpression()
|
||||
|
||||
|
||||
if CondLabel == '!if':
|
||||
ConditionSatisfied = self.__EvaluateConditional(Expression, IfList[-1][0][0] + 1, 'eval')
|
||||
else:
|
||||
@@ -819,7 +819,7 @@ class FdfParser:
|
||||
BranchDetermined = ConditionSatisfied
|
||||
IfList[-1] = [IfList[-1][0], ConditionSatisfied, BranchDetermined]
|
||||
if ConditionSatisfied:
|
||||
self.__WipeOffArea.append((IfList[-1][0], (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
|
||||
self.__WipeOffArea.append((IfList[-1][0], (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
|
||||
elif self.__Token in ('!elseif', '!else'):
|
||||
ElseStartPos = (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - len(self.__Token))
|
||||
if len(IfList) <= 0:
|
||||
@@ -891,7 +891,7 @@ class FdfParser:
|
||||
ScopeMacro = self.__MacroDict[TAB_COMMON, TAB_COMMON, TAB_COMMON]
|
||||
if ScopeMacro:
|
||||
MacroDict.update(ScopeMacro)
|
||||
|
||||
|
||||
# Section macro
|
||||
ScopeMacro = self.__MacroDict[
|
||||
self.__CurSection[0],
|
||||
@@ -923,12 +923,12 @@ class FdfParser:
|
||||
else:
|
||||
return ValueExpression(Expression, MacroPcdDict)()
|
||||
except WrnExpression as Excpt:
|
||||
#
|
||||
#
|
||||
# Catch expression evaluation warning here. We need to report
|
||||
# the precise number of line and return the evaluation result
|
||||
#
|
||||
EdkLogger.warn('Parser', "Suspicious expression: %s" % str(Excpt),
|
||||
File=self.FileName, ExtraData=self.__CurrentLine(),
|
||||
File=self.FileName, ExtraData=self.__CurrentLine(),
|
||||
Line=Line)
|
||||
return Excpt.result
|
||||
except Exception as Excpt:
|
||||
@@ -947,7 +947,7 @@ class FdfParser:
|
||||
raise Warning(str(Excpt), self.FileName, Line)
|
||||
else:
|
||||
if Expression.startswith('$(') and Expression[-1] == ')':
|
||||
Expression = Expression[2:-1]
|
||||
Expression = Expression[2:-1]
|
||||
return Expression in MacroPcdDict
|
||||
|
||||
## __IsToken() method
|
||||
@@ -1432,9 +1432,9 @@ class FdfParser:
|
||||
self.__UndoToken()
|
||||
self.__GetSetStatement(None)
|
||||
continue
|
||||
|
||||
|
||||
Macro = self.__Token
|
||||
|
||||
|
||||
if not self.__IsToken("="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
if not self.__GetNextToken() or self.__Token.startswith('['):
|
||||
@@ -1492,7 +1492,7 @@ class FdfParser:
|
||||
else:
|
||||
raise Warning("expected FdName in [FD.] section", self.FileName, self.CurrentLineNumber)
|
||||
self.CurrentFdName = FdName.upper()
|
||||
|
||||
|
||||
if self.CurrentFdName in self.Profile.FdDict:
|
||||
raise Warning("Unexpected the same FD name", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
@@ -1578,12 +1578,12 @@ class FdfParser:
|
||||
if self.__IsKeyword( "BaseAddress"):
|
||||
if not self.__IsToken( "="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if not self.__GetNextHexNumber():
|
||||
raise Warning("expected Hex base address", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
Obj.BaseAddress = self.__Token
|
||||
|
||||
|
||||
if self.__IsToken( "|"):
|
||||
pcdPair = self.__GetNextPcdName()
|
||||
Obj.BaseAddressPcd = pcdPair
|
||||
@@ -1595,7 +1595,7 @@ class FdfParser:
|
||||
if self.__IsKeyword( "Size"):
|
||||
if not self.__IsToken( "="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if not self.__GetNextHexNumber():
|
||||
raise Warning("expected Hex size", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
@@ -1612,13 +1612,13 @@ class FdfParser:
|
||||
if self.__IsKeyword( "ErasePolarity"):
|
||||
if not self.__IsToken( "="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if not self.__GetNextToken():
|
||||
raise Warning("expected Erase Polarity", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if self.__Token != "1" and self.__Token != "0":
|
||||
raise Warning("expected 1 or 0 Erase Polarity", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
Obj.ErasePolarity = self.__Token
|
||||
return True
|
||||
|
||||
@@ -1666,7 +1666,7 @@ class FdfParser:
|
||||
IsBlock = False
|
||||
while self.__GetBlockStatement(Obj):
|
||||
IsBlock = True
|
||||
|
||||
|
||||
Item = Obj.BlockSizeList[-1]
|
||||
if Item[0] is None or Item[1] is None:
|
||||
raise Warning("expected block statement", self.FileName, self.CurrentLineNumber)
|
||||
@@ -1835,7 +1835,7 @@ class FdfParser:
|
||||
# @retval False Not able to find
|
||||
#
|
||||
def __GetRegionLayout(self, Fd):
|
||||
Offset = self.__CalcRegionExpr()
|
||||
Offset = self.__CalcRegionExpr()
|
||||
if Offset is None:
|
||||
return False
|
||||
|
||||
@@ -2151,9 +2151,9 @@ class FdfParser:
|
||||
while True:
|
||||
self.__GetSetStatements(FvObj)
|
||||
|
||||
if not (self.__GetBlockStatement(FvObj) or self.__GetFvBaseAddress(FvObj) or
|
||||
self.__GetFvForceRebase(FvObj) or self.__GetFvAlignment(FvObj) or
|
||||
self.__GetFvAttributes(FvObj) or self.__GetFvNameGuid(FvObj) or
|
||||
if not (self.__GetBlockStatement(FvObj) or self.__GetFvBaseAddress(FvObj) or
|
||||
self.__GetFvForceRebase(FvObj) or self.__GetFvAlignment(FvObj) or
|
||||
self.__GetFvAttributes(FvObj) or self.__GetFvNameGuid(FvObj) or
|
||||
self.__GetFvExtEntryStatement(FvObj) or self.__GetFvNameString(FvObj)):
|
||||
break
|
||||
|
||||
@@ -2198,7 +2198,7 @@ class FdfParser:
|
||||
raise Warning("Unknown alignment value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
|
||||
Obj.FvAlignment = self.__Token
|
||||
return True
|
||||
|
||||
|
||||
## __GetFvBaseAddress() method
|
||||
#
|
||||
# Get BaseAddress for FV
|
||||
@@ -2222,8 +2222,8 @@ class FdfParser:
|
||||
if not BaseAddrValuePattern.match(self.__Token.upper()):
|
||||
raise Warning("Unknown FV base address value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
|
||||
Obj.FvBaseAddress = self.__Token
|
||||
return True
|
||||
|
||||
return True
|
||||
|
||||
## __GetFvForceRebase() method
|
||||
#
|
||||
# Get FvForceRebase for FV
|
||||
@@ -2246,14 +2246,14 @@ class FdfParser:
|
||||
|
||||
if self.__Token.upper() not in ["TRUE", "FALSE", "0", "0X0", "0X00", "1", "0X1", "0X01"]:
|
||||
raise Warning("Unknown FvForceRebase value '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if self.__Token.upper() in ["TRUE", "1", "0X1", "0X01"]:
|
||||
Obj.FvForceRebase = True
|
||||
elif self.__Token.upper() in ["FALSE", "0", "0X0", "0X00"]:
|
||||
Obj.FvForceRebase = False
|
||||
else:
|
||||
Obj.FvForceRebase = None
|
||||
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@@ -2288,7 +2288,7 @@ class FdfParser:
|
||||
FvObj.FvAttributeDict[name] = self.__Token
|
||||
|
||||
return IsWordToken
|
||||
|
||||
|
||||
## __GetFvNameGuid() method
|
||||
#
|
||||
# Get FV GUID for FV
|
||||
@@ -2334,7 +2334,7 @@ class FdfParser:
|
||||
|
||||
if not self.__IsKeyword ("TYPE"):
|
||||
raise Warning("expected 'TYPE'", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if not self.__IsToken( "="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
@@ -2355,7 +2355,7 @@ class FdfParser:
|
||||
|
||||
if not self.__IsToken( "="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if not self.__IsToken( "{"):
|
||||
raise Warning("expected '{'", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
@@ -2386,13 +2386,13 @@ class FdfParser:
|
||||
FvObj.FvExtEntryData.append(DataString)
|
||||
|
||||
if self.__Token == 'FILE':
|
||||
|
||||
|
||||
if not self.__IsToken( "="):
|
||||
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if not self.__GetNextToken():
|
||||
raise Warning("expected FV Extension Entry file path At Line ", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
FvObj.FvExtEntryData.append(self.__Token)
|
||||
|
||||
if not self.__IsToken( "}"):
|
||||
@@ -2555,7 +2555,7 @@ class FdfParser:
|
||||
raise Warning("expected ARCH name", self.FileName, self.CurrentLineNumber)
|
||||
FfsInfObj.UseArch = self.__Token
|
||||
|
||||
|
||||
|
||||
if self.__GetNextToken():
|
||||
p = re.compile(r'([a-zA-Z0-9\-]+|\$\(TARGET\)|\*)_([a-zA-Z0-9\-]+|\$\(TOOL_CHAIN_TAG\)|\*)_([a-zA-Z0-9\-]+|\$\(ARCH\))')
|
||||
if p.match(self.__Token) and p.match(self.__Token).span()[1] == len(self.__Token):
|
||||
@@ -2596,7 +2596,7 @@ class FdfParser:
|
||||
self.__UndoToken()
|
||||
self.__UndoToken()
|
||||
return False
|
||||
|
||||
|
||||
FfsFileObj = FfsFileStatement.FileStatement()
|
||||
FfsFileObj.FvFileType = self.__Token
|
||||
|
||||
@@ -2613,9 +2613,9 @@ class FdfParser:
|
||||
if not self.__IsToken( ")"):
|
||||
raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)
|
||||
self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'
|
||||
|
||||
|
||||
FfsFileObj.NameGuid = self.__Token
|
||||
|
||||
|
||||
self.__GetFilePart( FfsFileObj, MacroDict.copy())
|
||||
|
||||
if ForCapsule:
|
||||
@@ -2891,7 +2891,7 @@ class FdfParser:
|
||||
else:
|
||||
VerSectionObj.FileName = self.__Token
|
||||
Obj.SectionList.append(VerSectionObj)
|
||||
|
||||
|
||||
elif self.__IsKeyword( BINARY_FILE_TYPE_UI):
|
||||
if AlignValue == 'Auto':
|
||||
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
|
||||
@@ -3345,7 +3345,7 @@ class FdfParser:
|
||||
Value = self.__Token.strip()
|
||||
else:
|
||||
Value = self.__Token.strip()
|
||||
Obj.TokensDict[Name] = Value
|
||||
Obj.TokensDict[Name] = Value
|
||||
if not self.__GetNextToken():
|
||||
return False
|
||||
self.__UndoToken()
|
||||
@@ -3487,7 +3487,7 @@ class FdfParser:
|
||||
|
||||
if not self.__GetNextToken():
|
||||
raise Warning("expected File name", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
AnyFileName = self.__Token
|
||||
self.__VerifyFile(AnyFileName)
|
||||
|
||||
@@ -3520,7 +3520,7 @@ class FdfParser:
|
||||
else:
|
||||
CapsuleObj.CapsuleDataList.append(CapsuleAnyFile)
|
||||
return True
|
||||
|
||||
|
||||
## __GetAfileStatement() method
|
||||
#
|
||||
# Get Afile for capsule
|
||||
@@ -3540,14 +3540,14 @@ class FdfParser:
|
||||
|
||||
if not self.__GetNextToken():
|
||||
raise Warning("expected Afile name", self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
AfileName = self.__Token
|
||||
AfileBaseName = os.path.basename(AfileName)
|
||||
|
||||
|
||||
if os.path.splitext(AfileBaseName)[1] not in [".bin", ".BIN", ".Bin", ".dat", ".DAT", ".Dat", ".data", ".DATA", ".Data"]:
|
||||
raise Warning('invalid binary file type, should be one of "bin",BINARY_FILE_TYPE_BIN,"Bin","dat","DAT","Dat","data","DATA","Data"', \
|
||||
self.FileName, self.CurrentLineNumber)
|
||||
|
||||
|
||||
if not os.path.isabs(AfileName):
|
||||
AfileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(AfileName)
|
||||
self.__VerifyFile(AfileName)
|
||||
@@ -3701,7 +3701,7 @@ class FdfParser:
|
||||
if not self.__IsToken( ")"):
|
||||
raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)
|
||||
self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'
|
||||
|
||||
|
||||
NameGuid = self.__Token
|
||||
|
||||
KeepReloc = None
|
||||
@@ -3963,11 +3963,11 @@ class FdfParser:
|
||||
elif self.__GetNextToken():
|
||||
if self.__Token not in ("}", "COMPAT16", BINARY_FILE_TYPE_PE32, BINARY_FILE_TYPE_PIC, BINARY_FILE_TYPE_TE, "FV_IMAGE", "RAW", BINARY_FILE_TYPE_DXE_DEPEX,\
|
||||
BINARY_FILE_TYPE_UI, "VERSION", BINARY_FILE_TYPE_PEI_DEPEX, BINARY_FILE_TYPE_GUID, BINARY_FILE_TYPE_SMM_DEPEX):
|
||||
|
||||
|
||||
if self.__Token.startswith('PCD'):
|
||||
self.__UndoToken()
|
||||
self.__GetNextWord()
|
||||
|
||||
|
||||
if self.__Token == 'PCD':
|
||||
if not self.__IsToken( "("):
|
||||
raise Warning("expected '('", self.FileName, self.CurrentLineNumber)
|
||||
@@ -3975,9 +3975,9 @@ class FdfParser:
|
||||
if not self.__IsToken( ")"):
|
||||
raise Warning("expected ')'", self.FileName, self.CurrentLineNumber)
|
||||
self.__Token = 'PCD('+PcdPair[1]+'.'+PcdPair[0]+')'
|
||||
|
||||
EfiSectionObj.FileName = self.__Token
|
||||
|
||||
|
||||
EfiSectionObj.FileName = self.__Token
|
||||
|
||||
else:
|
||||
self.__UndoToken()
|
||||
else:
|
||||
@@ -4364,7 +4364,7 @@ class FdfParser:
|
||||
self.SectionParser(S)
|
||||
self.__UndoToken()
|
||||
return False
|
||||
|
||||
|
||||
self.__UndoToken()
|
||||
if not self.__IsToken("[OptionRom.", True):
|
||||
raise Warning("Unknown Keyword '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
|
||||
@@ -4383,7 +4383,7 @@ class FdfParser:
|
||||
isFile = self.__GetOptRomFileStatement(OptRomObj)
|
||||
if not isInf and not isFile:
|
||||
break
|
||||
|
||||
|
||||
return True
|
||||
|
||||
## __GetOptRomInfStatement() method
|
||||
@@ -4424,9 +4424,9 @@ class FdfParser:
|
||||
else:
|
||||
self.Profile.InfDict['ArchTBD'].append(ffsInf.InfFileName)
|
||||
|
||||
|
||||
|
||||
self.__GetOptRomOverrides (ffsInf)
|
||||
|
||||
|
||||
Obj.FfsList.append(ffsInf)
|
||||
return True
|
||||
|
||||
@@ -4488,7 +4488,7 @@ class FdfParser:
|
||||
EdkLogger.error("FdfParser", FORMAT_INVALID, File=self.FileName, Line=self.CurrentLineNumber)
|
||||
|
||||
Obj.OverrideAttribs = Overrides
|
||||
|
||||
|
||||
## __GetOptRomFileStatement() method
|
||||
#
|
||||
# Get FILE statements
|
||||
@@ -4520,7 +4520,7 @@ class FdfParser:
|
||||
|
||||
if FfsFileObj.FileType == 'EFI':
|
||||
self.__GetOptRomOverrides(FfsFileObj)
|
||||
|
||||
|
||||
Obj.FfsList.append(FfsFileObj)
|
||||
|
||||
return True
|
||||
@@ -4562,7 +4562,7 @@ class FdfParser:
|
||||
if hasattr(CapsuleDataObj, 'FvName') and CapsuleDataObj.FvName is not None and CapsuleDataObj.FvName.upper() not in RefFvList:
|
||||
RefFvList.append (CapsuleDataObj.FvName.upper())
|
||||
elif hasattr(CapsuleDataObj, 'FdName') and CapsuleDataObj.FdName is not None and CapsuleDataObj.FdName.upper() not in RefFdList:
|
||||
RefFdList.append (CapsuleDataObj.FdName.upper())
|
||||
RefFdList.append (CapsuleDataObj.FdName.upper())
|
||||
elif CapsuleDataObj.Ffs is not None:
|
||||
if isinstance(CapsuleDataObj.Ffs, FfsFileStatement.FileStatement):
|
||||
if CapsuleDataObj.Ffs.FvName is not None and CapsuleDataObj.Ffs.FvName.upper() not in RefFvList:
|
||||
@@ -4657,7 +4657,7 @@ class FdfParser:
|
||||
RefFvStack = []
|
||||
RefFvStack.append(FvName)
|
||||
FdAnalyzedList = []
|
||||
|
||||
|
||||
Index = 0
|
||||
while RefFvStack != [] and Index < MaxLength:
|
||||
Index = Index + 1
|
||||
@@ -4710,7 +4710,7 @@ class FdfParser:
|
||||
RefCapStack.append(CapName)
|
||||
FdAnalyzedList = []
|
||||
FvAnalyzedList = []
|
||||
|
||||
|
||||
Index = 0
|
||||
while RefCapStack != [] and Index < MaxLength:
|
||||
Index = Index + 1
|
||||
|
@@ -39,7 +39,7 @@ class Ffs(FDClassObject):
|
||||
SUP_MODULE_MM_STANDALONE : 'EFI_FV_FILETYPE_MM_STANDALONE',
|
||||
SUP_MODULE_MM_CORE_STANDALONE : 'EFI_FV_FILETYPE_MM_CORE_STANDALONE'
|
||||
}
|
||||
|
||||
|
||||
# mapping between section type in FDF and file suffix
|
||||
SectionSuffix = {
|
||||
BINARY_FILE_TYPE_PE32 : '.pe32',
|
||||
@@ -51,14 +51,14 @@ class Ffs(FDClassObject):
|
||||
'COMPAT16' : '.com16',
|
||||
'RAW' : '.raw',
|
||||
'FREEFORM_SUBTYPE_GUID': '.guid',
|
||||
'SUBTYPE_GUID' : '.guid',
|
||||
'SUBTYPE_GUID' : '.guid',
|
||||
'FV_IMAGE' : 'fv.sec',
|
||||
'COMPRESS' : '.com',
|
||||
'GUIDED' : '.guided',
|
||||
BINARY_FILE_TYPE_PEI_DEPEX : '.dpx',
|
||||
BINARY_FILE_TYPE_SMM_DEPEX : '.dpx'
|
||||
}
|
||||
|
||||
|
||||
## The constructor
|
||||
#
|
||||
# @param self The object pointer
|
||||
|
@@ -58,7 +58,7 @@ class FileStatement (FileStatementClassObject) :
|
||||
# @retval string Generated FFS file name
|
||||
#
|
||||
def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None, IsMakefile=False, FvName=None):
|
||||
|
||||
|
||||
if self.NameGuid is not None and self.NameGuid.startswith('PCD('):
|
||||
PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)
|
||||
if len(PcdValue) == 0:
|
||||
@@ -71,7 +71,7 @@ class FileStatement (FileStatementClassObject) :
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR, 'GUID value for %s in wrong format.' \
|
||||
% (self.NameGuid))
|
||||
self.NameGuid = RegistryGuidStr
|
||||
|
||||
|
||||
Str = self.NameGuid
|
||||
if FvName:
|
||||
Str += FvName
|
||||
|
@@ -225,7 +225,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
EdkLogger.warn("GenFds", GENFDS_ERROR, "Module %s NOT found in DSC file; Is it really a binary module?" % (self.InfFileName))
|
||||
|
||||
if self.ModuleType == SUP_MODULE_SMM_CORE and int(self.PiSpecVersion, 16) < 0x0001000A:
|
||||
EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)
|
||||
EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "SMM_CORE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x0001000A", File=self.InfFileName)
|
||||
|
||||
if self.ModuleType == SUP_MODULE_MM_CORE_STANDALONE and int(self.PiSpecVersion, 16) < 0x00010032:
|
||||
EdkLogger.error("GenFds", FORMAT_NOT_SUPPORTED, "MM_CORE_STANDALONE module type can't be used in the module with PI_SPECIFICATION_VERSION less than 0x00010032", File=self.InfFileName)
|
||||
@@ -374,13 +374,13 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
def PatchEfiFile(self, EfiFile, FileType):
|
||||
#
|
||||
# If the module does not have any patches, then return path to input file
|
||||
#
|
||||
#
|
||||
if not self.PatchPcds:
|
||||
return EfiFile
|
||||
|
||||
#
|
||||
# Only patch file if FileType is PE32 or ModuleType is USER_DEFINED
|
||||
#
|
||||
#
|
||||
if FileType != BINARY_FILE_TYPE_PE32 and self.ModuleType != SUP_MODULE_USER_DEFINED:
|
||||
return EfiFile
|
||||
|
||||
@@ -398,7 +398,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
|
||||
#
|
||||
# If a different file from the same module has already been patched, then generate an error
|
||||
#
|
||||
#
|
||||
if self.PatchedBinFile:
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR,
|
||||
'Only one binary file can be patched:\n'
|
||||
@@ -408,12 +408,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
|
||||
#
|
||||
# Copy unpatched file contents to output file location to perform patching
|
||||
#
|
||||
#
|
||||
CopyLongFilePath(EfiFile, Output)
|
||||
|
||||
#
|
||||
# Apply patches to patched output file
|
||||
#
|
||||
#
|
||||
for Pcd, Value in self.PatchPcds:
|
||||
RetVal, RetStr = PatchBinaryFile(Output, int(Pcd.Offset, 0), Pcd.DatumType, Value, Pcd.MaxDatumSize)
|
||||
if RetVal:
|
||||
@@ -421,12 +421,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
|
||||
#
|
||||
# Save the path of the patched output file
|
||||
#
|
||||
#
|
||||
self.PatchedBinFile = Output
|
||||
|
||||
#
|
||||
# Return path to patched output file
|
||||
#
|
||||
#
|
||||
return Output
|
||||
|
||||
## GenFfs() method
|
||||
@@ -448,14 +448,14 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
Arch = self.GetCurrentArch()
|
||||
SrcFile = mws.join( GenFdsGlobalVariable.WorkSpaceDir, self.InfFileName);
|
||||
DestFile = os.path.join( self.OutputPath, self.ModuleGuid + '.ffs')
|
||||
|
||||
|
||||
SrcFileDir = "."
|
||||
SrcPath = os.path.dirname(SrcFile)
|
||||
SrcFileName = os.path.basename(SrcFile)
|
||||
SrcFileBase, SrcFileExt = os.path.splitext(SrcFileName)
|
||||
SrcFileBase, SrcFileExt = os.path.splitext(SrcFileName)
|
||||
DestPath = os.path.dirname(DestFile)
|
||||
DestFileName = os.path.basename(DestFile)
|
||||
DestFileBase, DestFileExt = os.path.splitext(DestFileName)
|
||||
DestFileBase, DestFileExt = os.path.splitext(DestFileName)
|
||||
self.MacroDict = {
|
||||
# source file
|
||||
"${src}" : SrcFile,
|
||||
@@ -473,7 +473,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
}
|
||||
#
|
||||
# Allow binary type module not specify override rule in FDF file.
|
||||
#
|
||||
#
|
||||
if len(self.BinFileList) > 0:
|
||||
if self.Rule is None or self.Rule == "":
|
||||
self.Rule = "BINARY"
|
||||
@@ -534,7 +534,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
'$(NAMED_GUID)' : self.ModuleGuid
|
||||
}
|
||||
String = GenFdsGlobalVariable.MacroExtend(String, MacroDict)
|
||||
String = GenFdsGlobalVariable.MacroExtend(String, self.MacroDict)
|
||||
String = GenFdsGlobalVariable.MacroExtend(String, self.MacroDict)
|
||||
return String
|
||||
|
||||
## __GetRule__() method
|
||||
@@ -960,14 +960,14 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
Sect.FvAddr = FvChildAddr
|
||||
if FvParentAddr is not None and isinstance(Sect, GuidSection):
|
||||
Sect.FvParentAddr = FvParentAddr
|
||||
|
||||
|
||||
if Rule.KeyStringList != []:
|
||||
SectList, Align = Sect.GenSection(self.OutputPath, self.ModuleGuid, SecIndex, Rule.KeyStringList, self, IsMakefile = IsMakefile)
|
||||
else :
|
||||
SectList, Align = Sect.GenSection(self.OutputPath, self.ModuleGuid, SecIndex, self.KeyStringList, self, IsMakefile = IsMakefile)
|
||||
|
||||
|
||||
if not HasGeneratedFlag:
|
||||
UniVfrOffsetFileSection = ""
|
||||
UniVfrOffsetFileSection = ""
|
||||
ModuleFileName = mws.join(GenFdsGlobalVariable.WorkSpaceDir, self.InfFileName)
|
||||
InfData = GenFdsGlobalVariable.WorkSpace.BuildObject[PathClass(ModuleFileName), self.CurrentArch]
|
||||
#
|
||||
@@ -978,16 +978,16 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
for SourceFile in InfData.Sources:
|
||||
if SourceFile.Type.upper() == ".VFR" :
|
||||
#
|
||||
# search the .map file to find the offset of vfr binary in the PE32+/TE file.
|
||||
# search the .map file to find the offset of vfr binary in the PE32+/TE file.
|
||||
#
|
||||
VfrUniBaseName[SourceFile.BaseName] = (SourceFile.BaseName + "Bin")
|
||||
if SourceFile.Type.upper() == ".UNI" :
|
||||
#
|
||||
# search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
|
||||
# search the .map file to find the offset of Uni strings binary in the PE32+/TE file.
|
||||
#
|
||||
VfrUniBaseName["UniOffsetName"] = (self.BaseName + "Strings")
|
||||
|
||||
|
||||
|
||||
|
||||
if len(VfrUniBaseName) > 0:
|
||||
if IsMakefile:
|
||||
if InfData.BuildType != 'UEFI_HII':
|
||||
@@ -1023,7 +1023,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
if UniVfrOffsetFileSection:
|
||||
SectList.append(UniVfrOffsetFileSection)
|
||||
HasGeneratedFlag = True
|
||||
|
||||
|
||||
for SecName in SectList :
|
||||
SectFiles.append(SecName)
|
||||
SectAlignments.append(Align)
|
||||
@@ -1071,12 +1071,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
# @param self The object pointer
|
||||
# @param VfrUniBaseName A name list contain the UNI/INF object name.
|
||||
# @retval RetValue A list contain offset of UNI/INF object.
|
||||
#
|
||||
#
|
||||
def __GetBuildOutputMapFileVfrUniInfo(self, VfrUniBaseName):
|
||||
MapFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".map")
|
||||
EfiFileName = os.path.join(self.EfiOutputPath, self.BaseName + ".efi")
|
||||
return GetVariableOffset(MapFileName, EfiFileName, VfrUniBaseName.values())
|
||||
|
||||
|
||||
## __GenUniVfrOffsetFile() method
|
||||
#
|
||||
# Generate the offset file for the module which contain VFR or UNI file.
|
||||
@@ -1089,7 +1089,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
|
||||
# Use a instance of StringIO to cache data
|
||||
fStringIO = BytesIO('')
|
||||
|
||||
|
||||
for Item in VfrUniOffsetList:
|
||||
if (Item[0].find("Strings") != -1):
|
||||
#
|
||||
@@ -1099,7 +1099,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
#
|
||||
UniGuid = [0xe0, 0xc5, 0x13, 0x89, 0xf6, 0x33, 0x86, 0x4d, 0x9b, 0xf1, 0x43, 0xef, 0x89, 0xfc, 0x6, 0x66]
|
||||
UniGuid = [chr(ItemGuid) for ItemGuid in UniGuid]
|
||||
fStringIO.write(''.join(UniGuid))
|
||||
fStringIO.write(''.join(UniGuid))
|
||||
UniValue = pack ('Q', int (Item[1], 16))
|
||||
fStringIO.write (UniValue)
|
||||
else:
|
||||
@@ -1110,11 +1110,11 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
#
|
||||
VfrGuid = [0xb4, 0x7c, 0xbc, 0xd0, 0x47, 0x6a, 0x5f, 0x49, 0xaa, 0x11, 0x71, 0x7, 0x46, 0xda, 0x6, 0xa2]
|
||||
VfrGuid = [chr(ItemGuid) for ItemGuid in VfrGuid]
|
||||
fStringIO.write(''.join(VfrGuid))
|
||||
type (Item[1])
|
||||
fStringIO.write(''.join(VfrGuid))
|
||||
type (Item[1])
|
||||
VfrValue = pack ('Q', int (Item[1], 16))
|
||||
fStringIO.write (VfrValue)
|
||||
|
||||
|
||||
#
|
||||
# write data into file.
|
||||
#
|
||||
@@ -1122,7 +1122,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
SaveFileOnChange(UniVfrOffsetFileName, fStringIO.getvalue())
|
||||
except:
|
||||
EdkLogger.error("GenFds", FILE_WRITE_FAILURE, "Write data to file %s failed, please check whether the file been locked or using by other applications." %UniVfrOffsetFileName, None)
|
||||
|
||||
|
||||
fStringIO.close ()
|
||||
|
||||
|
||||
|
||||
|
@@ -53,7 +53,7 @@ class FV (FvClassObject):
|
||||
self.FvForceRebase = None
|
||||
self.FvRegionInFD = None
|
||||
self.UsedSizeEnable = False
|
||||
|
||||
|
||||
## AddToBuffer()
|
||||
#
|
||||
# Generate Fv and add it to the Buffer
|
||||
@@ -72,7 +72,7 @@ class FV (FvClassObject):
|
||||
|
||||
if BaseAddress is None and self.UiFvName.upper() + 'fv' in GenFds.ImageBinDict:
|
||||
return GenFds.ImageBinDict[self.UiFvName.upper() + 'fv']
|
||||
|
||||
|
||||
#
|
||||
# Check whether FV in Capsule is in FD flash region.
|
||||
# If yes, return error. Doesn't support FV in Capsule image is also in FD flash region.
|
||||
@@ -92,7 +92,7 @@ class FV (FvClassObject):
|
||||
GenFdsGlobalVariable.InfLogger( "\nGenerating %s FV" %self.UiFvName)
|
||||
GenFdsGlobalVariable.LargeFileInFvFlags.append(False)
|
||||
FFSGuid = None
|
||||
|
||||
|
||||
if self.FvBaseAddress is not None:
|
||||
BaseAddress = self.FvBaseAddress
|
||||
if not Flag:
|
||||
@@ -289,7 +289,7 @@ class FV (FvClassObject):
|
||||
if not self._GetBlockSize():
|
||||
#set default block size is 1
|
||||
self.FvInfFile.writelines("EFI_BLOCK_SIZE = 0x1" + TAB_LINE_BREAK)
|
||||
|
||||
|
||||
for BlockSize in self.BlockSizeList :
|
||||
if BlockSize[0] is not None:
|
||||
self.FvInfFile.writelines("EFI_BLOCK_SIZE = " + \
|
||||
@@ -331,7 +331,7 @@ class FV (FvClassObject):
|
||||
self.FvAlignment.strip() + \
|
||||
" = TRUE" + \
|
||||
TAB_LINE_BREAK)
|
||||
|
||||
|
||||
#
|
||||
# Generate FV extension header file
|
||||
#
|
||||
@@ -387,7 +387,7 @@ class FV (FvClassObject):
|
||||
TotalSize += (Size + 4)
|
||||
FvExtFile.seek(0)
|
||||
Buffer += pack('HH', (Size + 4), int(self.FvExtEntryTypeValue[Index], 16))
|
||||
Buffer += FvExtFile.read()
|
||||
Buffer += FvExtFile.read()
|
||||
FvExtFile.close()
|
||||
if self.FvExtEntryType[Index] == 'DATA':
|
||||
ByteList = self.FvExtEntryData[Index].split(',')
|
||||
@@ -418,7 +418,7 @@ class FV (FvClassObject):
|
||||
FvExtHeaderFileName + \
|
||||
TAB_LINE_BREAK)
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Add [Files]
|
||||
#
|
||||
|
@@ -47,7 +47,7 @@ from struct import unpack
|
||||
## Version and Copyright
|
||||
versionNumber = "1.0" + ' ' + gBUILD_VERSION
|
||||
__version__ = "%prog Version " + versionNumber
|
||||
__copyright__ = "Copyright (c) 2007 - 2017, Intel Corporation All rights reserved."
|
||||
__copyright__ = "Copyright (c) 2007 - 2018, Intel Corporation All rights reserved."
|
||||
|
||||
## Tool entrance method
|
||||
#
|
||||
@@ -72,10 +72,10 @@ def main():
|
||||
if Options.verbose is not None:
|
||||
EdkLogger.SetLevel(EdkLogger.VERBOSE)
|
||||
GenFdsGlobalVariable.VerboseMode = True
|
||||
|
||||
|
||||
if Options.FixedAddress is not None:
|
||||
GenFdsGlobalVariable.FixedLoadAddress = True
|
||||
|
||||
|
||||
if Options.quiet is not None:
|
||||
EdkLogger.SetLevel(EdkLogger.QUIET)
|
||||
if Options.debug is not None:
|
||||
@@ -100,7 +100,7 @@ def main():
|
||||
if Options.GenfdsMultiThread:
|
||||
GenFdsGlobalVariable.EnableGenfdsMultiThread = True
|
||||
os.chdir(GenFdsGlobalVariable.WorkSpaceDir)
|
||||
|
||||
|
||||
# set multiple workspace
|
||||
PackagesPath = os.getenv("PACKAGES_PATH")
|
||||
mws.setWs(GenFdsGlobalVariable.WorkSpaceDir, PackagesPath)
|
||||
@@ -228,7 +228,7 @@ def main():
|
||||
GlobalData.gDatabasePath = os.path.normpath(os.path.join(ConfDirectoryPath, GlobalData.gDatabasePath))
|
||||
BuildWorkSpace = WorkspaceDatabase(GlobalData.gDatabasePath)
|
||||
BuildWorkSpace.InitDatabase()
|
||||
|
||||
|
||||
#
|
||||
# Get files real name in workspace dir
|
||||
#
|
||||
@@ -244,7 +244,7 @@ def main():
|
||||
TargetArchList = set(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON, Options.BuildTarget, Options.ToolChain].SupArchList) & set(ArchList)
|
||||
if len(TargetArchList) == 0:
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR, "Target ARCH %s not in platform supported ARCH %s" % (str(ArchList), str(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, TAB_COMMON].SupArchList)))
|
||||
|
||||
|
||||
for Arch in ArchList:
|
||||
GenFdsGlobalVariable.OutputDirFromDscDict[Arch] = NormPath(BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, Options.BuildTarget, Options.ToolChain].OutputDirectory)
|
||||
GenFdsGlobalVariable.PlatformName = BuildWorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, Options.BuildTarget, Options.ToolChain].PlatformName
|
||||
@@ -551,7 +551,7 @@ class GenFds :
|
||||
Buffer = BytesIO('')
|
||||
FvObj.AddToBuffer(Buffer)
|
||||
Buffer.close()
|
||||
|
||||
|
||||
if GenFds.OnlyGenerateThisFv is None and GenFds.OnlyGenerateThisFd is None and GenFds.OnlyGenerateThisCap is None:
|
||||
if GenFdsGlobalVariable.FdfParser.Profile.CapsuleDict != {}:
|
||||
GenFdsGlobalVariable.VerboseLogger("\n Generate other Capsule images!")
|
||||
@@ -617,7 +617,7 @@ class GenFds :
|
||||
# @retval None
|
||||
#
|
||||
def DisplayFvSpaceInfo(FdfParser):
|
||||
|
||||
|
||||
FvSpaceInfoList = []
|
||||
MaxFvNameLength = 0
|
||||
for FvName in FdfParser.Profile.FvDict:
|
||||
@@ -644,10 +644,10 @@ class GenFds :
|
||||
if NameValue[0].strip() == 'EFI_FV_SPACE_SIZE':
|
||||
FreeFound = True
|
||||
Free = NameValue[1].strip()
|
||||
|
||||
|
||||
if TotalFound and UsedFound and FreeFound:
|
||||
FvSpaceInfoList.append((FvName, Total, Used, Free))
|
||||
|
||||
|
||||
GenFdsGlobalVariable.InfLogger('\nFV Space Information')
|
||||
for FvSpaceInfo in FvSpaceInfoList:
|
||||
Name = FvSpaceInfo[0]
|
||||
@@ -675,18 +675,18 @@ class GenFds :
|
||||
if PcdObj.TokenCName == 'PcdBsBaseAddress':
|
||||
PcdValue = PcdObj.DefaultValue
|
||||
break
|
||||
|
||||
|
||||
if PcdValue == '':
|
||||
return
|
||||
|
||||
|
||||
Int64PcdValue = long(PcdValue, 0)
|
||||
if Int64PcdValue == 0 or Int64PcdValue < -1:
|
||||
if Int64PcdValue == 0 or Int64PcdValue < -1:
|
||||
return
|
||||
|
||||
|
||||
TopAddress = 0
|
||||
if Int64PcdValue > 0:
|
||||
TopAddress = Int64PcdValue
|
||||
|
||||
|
||||
ModuleDict = BuildDb.BuildObject[DscFile, TAB_COMMON, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag].Modules
|
||||
for Key in ModuleDict:
|
||||
ModuleObj = BuildDb.BuildObject[Key, TAB_COMMON, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
|
||||
|
@@ -65,7 +65,7 @@ class GenFdsGlobalVariable:
|
||||
FdfFileTimeStamp = 0
|
||||
FixedLoadAddress = False
|
||||
PlatformName = ''
|
||||
|
||||
|
||||
BuildRuleFamily = "MSFT"
|
||||
ToolChainFamily = "MSFT"
|
||||
__BuildRuleDatabase = None
|
||||
@@ -75,7 +75,7 @@ class GenFdsGlobalVariable:
|
||||
CopyList = []
|
||||
ModuleFile = ''
|
||||
EnableGenfdsMultiThread = False
|
||||
|
||||
|
||||
#
|
||||
# The list whose element are flags to indicate if large FFS or SECTION files exist in FV.
|
||||
# At the beginning of each generation of FV, false flag is appended to the list,
|
||||
@@ -90,7 +90,7 @@ class GenFdsGlobalVariable:
|
||||
LARGE_FILE_SIZE = 0x1000000
|
||||
|
||||
SectionHeader = struct.Struct("3B 1B")
|
||||
|
||||
|
||||
## LoadBuildRule
|
||||
#
|
||||
@staticmethod
|
||||
@@ -117,7 +117,7 @@ class GenFdsGlobalVariable:
|
||||
and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY] \
|
||||
and ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]:
|
||||
GenFdsGlobalVariable.BuildRuleFamily = ToolDefinition[DataType.TAB_TOD_DEFINES_BUILDRULEFAMILY][GenFdsGlobalVariable.ToolChainTag]
|
||||
|
||||
|
||||
if DataType.TAB_TOD_DEFINES_FAMILY in ToolDefinition \
|
||||
and GenFdsGlobalVariable.ToolChainTag in ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY] \
|
||||
and ToolDefinition[DataType.TAB_TOD_DEFINES_FAMILY][GenFdsGlobalVariable.ToolChainTag]:
|
||||
@@ -229,11 +229,11 @@ class GenFdsGlobalVariable:
|
||||
while Index < len(SourceList):
|
||||
Source = SourceList[Index]
|
||||
Index = Index + 1
|
||||
|
||||
|
||||
if File.IsBinary and File == Source and Inf.Binaries is not None and File in Inf.Binaries:
|
||||
# Skip all files that are not binary libraries
|
||||
if not Inf.LibraryClass:
|
||||
continue
|
||||
continue
|
||||
RuleObject = BuildRules[DataType.TAB_DEFAULT_BINARY_FILE]
|
||||
elif FileType in BuildRules:
|
||||
RuleObject = BuildRules[FileType]
|
||||
@@ -244,15 +244,15 @@ class GenFdsGlobalVariable:
|
||||
if LastTarget:
|
||||
TargetList.add(str(LastTarget))
|
||||
break
|
||||
|
||||
|
||||
FileType = RuleObject.SourceFileType
|
||||
|
||||
|
||||
# stop at STATIC_LIBRARY for library
|
||||
if Inf.LibraryClass and FileType == DataType.TAB_STATIC_LIBRARY:
|
||||
if LastTarget:
|
||||
TargetList.add(str(LastTarget))
|
||||
break
|
||||
|
||||
|
||||
Target = RuleObject.Apply(Source)
|
||||
if not Target:
|
||||
if LastTarget:
|
||||
@@ -261,11 +261,11 @@ class GenFdsGlobalVariable:
|
||||
elif not Target.Outputs:
|
||||
# Only do build for target with outputs
|
||||
TargetList.add(str(Target))
|
||||
|
||||
|
||||
# to avoid cyclic rule
|
||||
if FileType in RuleChain:
|
||||
break
|
||||
|
||||
|
||||
RuleChain.append(FileType)
|
||||
SourceList.extend(Target.Outputs)
|
||||
LastTarget = Target
|
||||
@@ -645,19 +645,19 @@ class GenFdsGlobalVariable:
|
||||
@staticmethod
|
||||
def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,
|
||||
Revision=None, DeviceId=None, VendorId=None, IsMakefile=False):
|
||||
InputList = []
|
||||
InputList = []
|
||||
Cmd = ["EfiRom"]
|
||||
if len(EfiInput) > 0:
|
||||
|
||||
|
||||
if Compress:
|
||||
Cmd.append("-ec")
|
||||
else:
|
||||
Cmd.append("-e")
|
||||
|
||||
|
||||
for EfiFile in EfiInput:
|
||||
Cmd.append(EfiFile)
|
||||
InputList.append (EfiFile)
|
||||
|
||||
|
||||
if len(BinaryInput) > 0:
|
||||
Cmd.append("-b")
|
||||
for BinFile in BinaryInput:
|
||||
@@ -668,7 +668,7 @@ class GenFdsGlobalVariable:
|
||||
if not GenFdsGlobalVariable.NeedsUpdate(Output, InputList) and not IsMakefile:
|
||||
return
|
||||
GenFdsGlobalVariable.DebugLogger(EdkLogger.DEBUG_5, "%s needs update because of newer %s" % (Output, InputList))
|
||||
|
||||
|
||||
if ClassCode is not None:
|
||||
Cmd += ("-l", ClassCode)
|
||||
if Revision is not None:
|
||||
@@ -811,7 +811,7 @@ class GenFdsGlobalVariable:
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)
|
||||
if PcdObj.DatumType != DataType.TAB_VOID:
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)
|
||||
|
||||
|
||||
PcdValue = PcdObj.DefaultValue
|
||||
return PcdValue
|
||||
|
||||
@@ -827,7 +827,7 @@ class GenFdsGlobalVariable:
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not FixedAtBuild type." % PcdPattern)
|
||||
if PcdObj.DatumType != DataType.TAB_VOID:
|
||||
EdkLogger.error("GenFds", GENFDS_ERROR, "%s is not VOID* datum type." % PcdPattern)
|
||||
|
||||
|
||||
PcdValue = PcdObj.DefaultValue
|
||||
return PcdValue
|
||||
|
||||
|
@@ -76,7 +76,7 @@ class GuidSection(GuidSectionClassObject) :
|
||||
FvAddrIsSet = True
|
||||
else:
|
||||
FvAddrIsSet = False
|
||||
|
||||
|
||||
if self.ProcessRequired in ("TRUE", "1"):
|
||||
if self.FvAddr != []:
|
||||
#no use FvAddr when the image is processed.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# process OptionROM generation from FILE statement
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -18,7 +18,7 @@
|
||||
import Common.LongFilePathOs as os
|
||||
|
||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||
##
|
||||
##
|
||||
#
|
||||
#
|
||||
class OptRomFileStatement:
|
||||
@@ -40,10 +40,10 @@ class OptRomFileStatement:
|
||||
# @retval string Generated FFS file name
|
||||
#
|
||||
def GenFfs(self, Dict = {}, IsMakefile=False):
|
||||
|
||||
|
||||
if self.FileName is not None:
|
||||
self.FileName = GenFdsGlobalVariable.ReplaceWorkspaceMacro(self.FileName)
|
||||
|
||||
|
||||
return self.FileName
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# process OptionROM generation from INF statement
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -26,7 +26,7 @@ from Common.StringUtils import *
|
||||
from FfsInfStatement import FfsInfStatement
|
||||
from GenFdsGlobalVariable import GenFdsGlobalVariable
|
||||
|
||||
##
|
||||
##
|
||||
#
|
||||
#
|
||||
class OptRomInfStatement (FfsInfStatement):
|
||||
@@ -45,7 +45,7 @@ class OptRomInfStatement (FfsInfStatement):
|
||||
# @param self The object pointer
|
||||
#
|
||||
def __GetOptRomParams(self):
|
||||
|
||||
|
||||
if self.OverrideAttribs is None:
|
||||
self.OverrideAttribs = OptionRom.OverrideAttribs()
|
||||
|
||||
@@ -59,21 +59,21 @@ class OptRomInfStatement (FfsInfStatement):
|
||||
|
||||
if self.OverrideAttribs.PciVendorId is None:
|
||||
self.OverrideAttribs.PciVendorId = self.OptRomDefs.get ('PCI_VENDOR_ID')
|
||||
|
||||
|
||||
if self.OverrideAttribs.PciClassCode is None:
|
||||
self.OverrideAttribs.PciClassCode = self.OptRomDefs.get ('PCI_CLASS_CODE')
|
||||
|
||||
|
||||
if self.OverrideAttribs.PciDeviceId is None:
|
||||
self.OverrideAttribs.PciDeviceId = self.OptRomDefs.get ('PCI_DEVICE_ID')
|
||||
|
||||
|
||||
if self.OverrideAttribs.PciRevision is None:
|
||||
self.OverrideAttribs.PciRevision = self.OptRomDefs.get ('PCI_REVISION')
|
||||
|
||||
# InfObj = GenFdsGlobalVariable.WorkSpace.BuildObject[self.PathClassObj, self.CurrentArch]
|
||||
|
||||
# InfObj = GenFdsGlobalVariable.WorkSpace.BuildObject[self.PathClassObj, self.CurrentArch]
|
||||
# RecordList = InfObj._RawData[MODEL_META_DATA_HEADER, InfObj._Arch, InfObj._Platform]
|
||||
# for Record in RecordList:
|
||||
# Record = ReplaceMacros(Record, GlobalData.gEdkGlobal, False)
|
||||
# Name = Record[0]
|
||||
# Name = Record[0]
|
||||
## GenFfs() method
|
||||
#
|
||||
# Generate FFS
|
||||
@@ -147,8 +147,8 @@ class OptRomInfStatement (FfsInfStatement):
|
||||
OutputFileList.append(GenSecInputFile)
|
||||
else:
|
||||
FileList, IsSect = Section.Section.GetFileList(self, '', Sect.FileExtension)
|
||||
OutputFileList.extend(FileList)
|
||||
|
||||
OutputFileList.extend(FileList)
|
||||
|
||||
return OutputFileList
|
||||
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# process OptionROM generation
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -28,7 +28,7 @@ from Common.BuildToolError import *
|
||||
|
||||
T_CHAR_LF = '\n'
|
||||
|
||||
##
|
||||
##
|
||||
#
|
||||
#
|
||||
class OPTIONROM (OptionRomClassObject):
|
||||
@@ -57,7 +57,7 @@ class OPTIONROM (OptionRomClassObject):
|
||||
|
||||
# Process Modules in FfsList
|
||||
for FfsFile in self.FfsList :
|
||||
|
||||
|
||||
if isinstance(FfsFile, OptRomInfStatement.OptRomInfStatement):
|
||||
FilePathNameList = FfsFile.GenFfs(IsMakefile=Flag)
|
||||
if len(FilePathNameList) == 0:
|
||||
@@ -70,14 +70,14 @@ class OPTIONROM (OptionRomClassObject):
|
||||
if not os.path.exists(TmpOutputDir) :
|
||||
os.makedirs(TmpOutputDir)
|
||||
TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')
|
||||
|
||||
GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
|
||||
FilePathNameList,
|
||||
[],
|
||||
FfsFile.OverrideAttribs.NeedCompress,
|
||||
FfsFile.OverrideAttribs.PciClassCode,
|
||||
FfsFile.OverrideAttribs.PciRevision,
|
||||
FfsFile.OverrideAttribs.PciDeviceId,
|
||||
|
||||
GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
|
||||
FilePathNameList,
|
||||
[],
|
||||
FfsFile.OverrideAttribs.NeedCompress,
|
||||
FfsFile.OverrideAttribs.PciClassCode,
|
||||
FfsFile.OverrideAttribs.PciRevision,
|
||||
FfsFile.OverrideAttribs.PciDeviceId,
|
||||
FfsFile.OverrideAttribs.PciVendorId,
|
||||
IsMakefile = Flag)
|
||||
BinFileList.append(TmpOutputFile)
|
||||
@@ -89,14 +89,14 @@ class OPTIONROM (OptionRomClassObject):
|
||||
if not os.path.exists(TmpOutputDir) :
|
||||
os.makedirs(TmpOutputDir)
|
||||
TmpOutputFile = os.path.join(TmpOutputDir, FileName+'.tmp')
|
||||
|
||||
GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
|
||||
[FilePathName],
|
||||
[],
|
||||
FfsFile.OverrideAttribs.NeedCompress,
|
||||
FfsFile.OverrideAttribs.PciClassCode,
|
||||
FfsFile.OverrideAttribs.PciRevision,
|
||||
FfsFile.OverrideAttribs.PciDeviceId,
|
||||
|
||||
GenFdsGlobalVariable.GenerateOptionRom(TmpOutputFile,
|
||||
[FilePathName],
|
||||
[],
|
||||
FfsFile.OverrideAttribs.NeedCompress,
|
||||
FfsFile.OverrideAttribs.PciClassCode,
|
||||
FfsFile.OverrideAttribs.PciRevision,
|
||||
FfsFile.OverrideAttribs.PciDeviceId,
|
||||
FfsFile.OverrideAttribs.PciVendorId,
|
||||
IsMakefile=Flag)
|
||||
BinFileList.append(TmpOutputFile)
|
||||
@@ -105,13 +105,13 @@ class OPTIONROM (OptionRomClassObject):
|
||||
EfiFileList.append(FilePathName)
|
||||
else:
|
||||
BinFileList.append(FilePathName)
|
||||
|
||||
|
||||
#
|
||||
# Call EfiRom tool
|
||||
#
|
||||
OutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.DriverName)
|
||||
OutputFile = OutputFile + '.rom'
|
||||
|
||||
|
||||
GenFdsGlobalVariable.GenerateOptionRom(
|
||||
OutputFile,
|
||||
EfiFileList,
|
||||
@@ -121,17 +121,17 @@ class OPTIONROM (OptionRomClassObject):
|
||||
if not Flag:
|
||||
GenFdsGlobalVariable.InfLogger( "\nGenerate %s Option ROM Successfully" %self.DriverName)
|
||||
GenFdsGlobalVariable.SharpCounter = 0
|
||||
|
||||
|
||||
return OutputFile
|
||||
|
||||
class OverrideAttribs:
|
||||
|
||||
|
||||
## The constructor
|
||||
#
|
||||
# @param self The object pointer
|
||||
#
|
||||
def __init__(self):
|
||||
|
||||
|
||||
self.PciVendorId = None
|
||||
self.PciClassCode = None
|
||||
self.PciDeviceId = None
|
||||
|
@@ -311,7 +311,7 @@ class Region(RegionClassObject):
|
||||
if self.Offset >= End:
|
||||
Start = End
|
||||
continue
|
||||
# region located in current blocks
|
||||
# region located in current blocks
|
||||
else:
|
||||
# region ended within current blocks
|
||||
if self.Offset + self.Size <= End:
|
||||
@@ -363,5 +363,5 @@ class Region(RegionClassObject):
|
||||
else:
|
||||
Index += 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -160,7 +160,7 @@ class Section (SectionClassObject):
|
||||
SuffixMap = FfsInf.GetFinalTargetSuffixMap()
|
||||
if Suffix in SuffixMap:
|
||||
FileList.extend(SuffixMap[Suffix])
|
||||
|
||||
|
||||
#Process the file lists is alphabetical for a same section type
|
||||
if len (FileList) > 1:
|
||||
FileList.sort()
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# process VTF generation
|
||||
#
|
||||
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -25,7 +25,7 @@ T_CHAR_LF = '\n'
|
||||
#
|
||||
#
|
||||
class Vtf (VtfClassObject):
|
||||
|
||||
|
||||
## The constructor
|
||||
#
|
||||
# @param self The object pointer
|
||||
@@ -46,7 +46,7 @@ class Vtf (VtfClassObject):
|
||||
OutputFile = os.path.join(GenFdsGlobalVariable.FvDir, self.UiName + '.Vtf')
|
||||
BaseAddArg = self.GetBaseAddressArg(FdAddressDict)
|
||||
OutputArg, VtfRawDict = self.GenOutputArg()
|
||||
|
||||
|
||||
Cmd = (
|
||||
'GenVtf',
|
||||
) + OutputArg + (
|
||||
@@ -55,9 +55,9 @@ class Vtf (VtfClassObject):
|
||||
|
||||
GenFdsGlobalVariable.CallExternalTool(Cmd, "GenFv -Vtf Failed!")
|
||||
GenFdsGlobalVariable.SharpCounter = 0
|
||||
|
||||
|
||||
return VtfRawDict
|
||||
|
||||
|
||||
## GenBsfInf() method
|
||||
#
|
||||
# Generate inf used to generate VTF
|
||||
@@ -154,7 +154,7 @@ class Vtf (VtfClassObject):
|
||||
for component in self.ComponentStatementList :
|
||||
if component.CompLoc.upper() != 'NONE' and not (component.CompLoc.upper() in FvList):
|
||||
FvList.append(component.CompLoc.upper())
|
||||
|
||||
|
||||
return FvList
|
||||
|
||||
## GetBaseAddressArg() method
|
||||
@@ -173,13 +173,13 @@ class Vtf (VtfClassObject):
|
||||
'-s', '0x%x' % Size,
|
||||
)
|
||||
return CmdStr
|
||||
|
||||
|
||||
## GenOutputArg() method
|
||||
#
|
||||
# Get output arguments for GenVtf
|
||||
#
|
||||
# @param self The object pointer
|
||||
#
|
||||
#
|
||||
def GenOutputArg(self):
|
||||
FvVtfDict = {}
|
||||
OutputFileName = ''
|
||||
@@ -192,6 +192,6 @@ class Vtf (VtfClassObject):
|
||||
OutputFileName = os.path.join(GenFdsGlobalVariable.FvDir, OutputFileName)
|
||||
Arg += ('-o', OutputFileName)
|
||||
FvVtfDict[FvObj.upper()] = OutputFileName
|
||||
|
||||
|
||||
return Arg, FvVtfDict
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user