summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)