summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/GenFds
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2016-09-22 09:48:46 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2016-09-25 08:21:56 +0800
commit587e9dfbbafe7d4e772c1870b8c880c6d7a8a70c (patch)
tree8f125818b65628fdc7937830b85a2fcb366364cb /BaseTools/Source/Python/GenFds
parentea317c0658b013659e064ba0323d1da8294acf4e (diff)
downloadedk2-platforms-587e9dfbbafe7d4e772c1870b8c880c6d7a8a70c.tar.xz
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>
Diffstat (limited to 'BaseTools/Source/Python/GenFds')
-rw-r--r--BaseTools/Source/Python/GenFds/FfsInfStatement.py33
1 files changed, 17 insertions, 16 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index b0b22d194d..e9517a4b04 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -941,22 +941,23 @@ class FfsInfStatement(FfsInfStatementClassObject):
#
# Generate the Raw data of raw section
#
- os.path.join( self.OutputPath, self.BaseName + '.offset')
- UniVfrOffsetFileName = os.path.join( self.OutputPath, self.BaseName + '.offset')
- UniVfrOffsetFileSection = os.path.join( self.OutputPath, self.BaseName + 'Offset' + '.raw')
-
- self.__GenUniVfrOffsetFile (VfrUniOffsetList, UniVfrOffsetFileName)
-
- UniVfrOffsetFileNameList = []
- UniVfrOffsetFileNameList.append(UniVfrOffsetFileName)
- """Call GenSection"""
- GenFdsGlobalVariable.GenerateSection(UniVfrOffsetFileSection,
- UniVfrOffsetFileNameList,
- "EFI_SECTION_RAW"
- )
- os.remove(UniVfrOffsetFileName)
- SectList.append(UniVfrOffsetFileSection)
- HasGneratedFlag = True
+ if VfrUniOffsetList:
+ os.path.join( self.OutputPath, self.BaseName + '.offset')
+ UniVfrOffsetFileName = os.path.join( self.OutputPath, self.BaseName + '.offset')
+ UniVfrOffsetFileSection = os.path.join( self.OutputPath, self.BaseName + 'Offset' + '.raw')
+
+ self.__GenUniVfrOffsetFile (VfrUniOffsetList, UniVfrOffsetFileName)
+
+ UniVfrOffsetFileNameList = []
+ UniVfrOffsetFileNameList.append(UniVfrOffsetFileName)
+ """Call GenSection"""
+ GenFdsGlobalVariable.GenerateSection(UniVfrOffsetFileSection,
+ UniVfrOffsetFileNameList,
+ "EFI_SECTION_RAW"
+ )
+ os.remove(UniVfrOffsetFileName)
+ SectList.append(UniVfrOffsetFileSection)
+ HasGneratedFlag = True
for SecName in SectList :
SectFiles.append(SecName)