BaseTools: Add a keyword FvNameString in FDF

The keyword with value TRUE OR FALSE is used to
indicate whether the FV UI name is included in
FV EXT header as a entry or not.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18090 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Yingke Liu
2015-07-28 05:53:08 +00:00
committed by yingke
parent 161b8359a8
commit aaf8aa7b2c
3 changed files with 40 additions and 20 deletions

View File

@ -2068,9 +2068,12 @@ class FdfParser:
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)):
self.__GetFvExtEntryStatement(FvObj) or self.__GetFvNameString(FvObj)):
break
if FvObj.FvNameString == 'TRUE' and not FvObj.FvNameGuid:
raise Warning("FvNameString found but FvNameGuid was not found", self.FileName, self.CurrentLineNumber)
self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy())
self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy())
@ -2225,6 +2228,21 @@ class FdfParser:
return True
def __GetFvNameString(self, FvObj):
if not self.__IsKeyword( "FvNameString"):
return False
if not self.__IsToken( "="):
raise Warning("expected '='", self.FileName, self.CurrentLineNumber)
if not self.__GetNextToken() or self.__Token not in ('TRUE', 'FALSE'):
raise Warning("expected TRUE or FALSE for FvNameString", self.FileName, self.CurrentLineNumber)
FvObj.FvNameString = self.__Token
return True
def __GetFvExtEntryStatement(self, FvObj):
if not self.__IsKeyword( "FV_EXT_ENTRY"):