summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/FdfParser.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FdfParser.py')
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index ea1c3eeb30..fb5fd85e0a 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -3749,8 +3749,19 @@ class FdfParser:
#
def _GetEfiSection(self, Obj):
OldPos = self.GetFileBufferPos()
+ EfiSectionObj = EfiSection()
if not self._GetNextWord():
- return False
+ CurrentLine = self._CurrentLine()[self.CurrentOffsetWithinLine:].split()[0].strip()
+ if self._Token == '{' and Obj.FvFileType == "RAW" and TAB_SPLIT in CurrentLine:
+ if self._IsToken(TAB_VALUE_SPLIT):
+ EfiSectionObj.FileExtension = self._GetFileExtension()
+ elif self._GetNextToken():
+ EfiSectionObj.FileName = self._Token
+ EfiSectionObj.SectionType = BINARY_FILE_TYPE_RAW
+ Obj.SectionList.append(EfiSectionObj)
+ return True
+ else:
+ return False
SectionName = self._Token
if SectionName not in {
@@ -3816,7 +3827,6 @@ class FdfParser:
Obj.SectionList.append(FvImageSectionObj)
return True
- EfiSectionObj = EfiSection()
EfiSectionObj.SectionType = SectionName
if not self._GetNextToken():