BaseTools: handling the case that map file is not exist
We meet a case that add the library inf file which has the uni file in the [Sources] section, for this case there will no map file exist, it cause build tools report Traceback error. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -941,22 +941,23 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
|||||||
#
|
#
|
||||||
# Generate the Raw data of raw section
|
# Generate the Raw data of raw section
|
||||||
#
|
#
|
||||||
os.path.join( self.OutputPath, self.BaseName + '.offset')
|
if VfrUniOffsetList:
|
||||||
UniVfrOffsetFileName = os.path.join( self.OutputPath, self.BaseName + '.offset')
|
os.path.join( self.OutputPath, self.BaseName + '.offset')
|
||||||
UniVfrOffsetFileSection = os.path.join( self.OutputPath, self.BaseName + 'Offset' + '.raw')
|
UniVfrOffsetFileName = os.path.join( self.OutputPath, self.BaseName + '.offset')
|
||||||
|
UniVfrOffsetFileSection = os.path.join( self.OutputPath, self.BaseName + 'Offset' + '.raw')
|
||||||
self.__GenUniVfrOffsetFile (VfrUniOffsetList, UniVfrOffsetFileName)
|
|
||||||
|
self.__GenUniVfrOffsetFile (VfrUniOffsetList, UniVfrOffsetFileName)
|
||||||
UniVfrOffsetFileNameList = []
|
|
||||||
UniVfrOffsetFileNameList.append(UniVfrOffsetFileName)
|
UniVfrOffsetFileNameList = []
|
||||||
"""Call GenSection"""
|
UniVfrOffsetFileNameList.append(UniVfrOffsetFileName)
|
||||||
GenFdsGlobalVariable.GenerateSection(UniVfrOffsetFileSection,
|
"""Call GenSection"""
|
||||||
UniVfrOffsetFileNameList,
|
GenFdsGlobalVariable.GenerateSection(UniVfrOffsetFileSection,
|
||||||
"EFI_SECTION_RAW"
|
UniVfrOffsetFileNameList,
|
||||||
)
|
"EFI_SECTION_RAW"
|
||||||
os.remove(UniVfrOffsetFileName)
|
)
|
||||||
SectList.append(UniVfrOffsetFileSection)
|
os.remove(UniVfrOffsetFileName)
|
||||||
HasGneratedFlag = True
|
SectList.append(UniVfrOffsetFileSection)
|
||||||
|
HasGneratedFlag = True
|
||||||
|
|
||||||
for SecName in SectList :
|
for SecName in SectList :
|
||||||
SectFiles.append(SecName)
|
SectFiles.append(SecName)
|
||||||
|
Reference in New Issue
Block a user