BaseTools: Replace Binary File type strings with predefined constant
BINARY_FILE_TYPE_FW was 'FW' BINARY_FILE_TYPE_GUID was 'GUID' BINARY_FILE_TYPE_PREEFORM was 'PREEFORM' BINARY_FILE_TYPE_UEFI_APP was 'UEFI_APP' BINARY_FILE_TYPE_UNI_UI was 'UNI_UI' BINARY_FILE_TYPE_UNI_VER was 'UNI_VER' BINARY_FILE_TYPE_LIB was 'LIB' BINARY_FILE_TYPE_PE32 was 'PE32' BINARY_FILE_TYPE_PIC was 'PIC' BINARY_FILE_TYPE_PEI_DEPEX was 'PEI_DEPEX' BINARY_FILE_TYPE_DXE_DEPEX was 'DXE_DEPEX' BINARY_FILE_TYPE_SMM_DEPEX was 'SMM_DEPEX' BINARY_FILE_TYPE_TE was 'TE' BINARY_FILE_TYPE_VER was 'VER' BINARY_FILE_TYPE_UI was 'UI' BINARY_FILE_TYPE_BIN was 'BIN' BINARY_FILE_TYPE_FV was 'FV' v2 - split apart FV and GUID types with different meanings. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
be409b6756
commit
91fa33eeca
@ -315,7 +315,7 @@ def main():
|
||||
for Fd in FdfParserObj.Profile.FdDict:
|
||||
FdObj = FdfParserObj.Profile.FdDict[Fd]
|
||||
for RegionObj in FdObj.RegionList:
|
||||
if RegionObj.RegionType != 'FV':
|
||||
if RegionObj.RegionType != BINARY_FILE_TYPE_FV:
|
||||
continue
|
||||
for RegionData in RegionObj.RegionDataList:
|
||||
if FvObj.UiFvName.upper() == RegionData.upper():
|
||||
@ -405,7 +405,7 @@ def FindExtendTool(KeyStringList, CurrentArchList, NameGuid):
|
||||
KeyList[1] + \
|
||||
'_' + \
|
||||
KeyList[2]
|
||||
if Key in KeyStringList and KeyList[4] == 'GUID':
|
||||
if Key in KeyStringList and KeyList[4] == TAB_GUID:
|
||||
ToolPathKey = Key + '_' + KeyList[3] + '_PATH'
|
||||
ToolOptionKey = Key + '_' + KeyList[3] + '_FLAGS'
|
||||
ToolPath = ToolDefinition.get(ToolPathKey)
|
||||
@ -447,7 +447,7 @@ def FindExtendTool(KeyStringList, CurrentArchList, NameGuid):
|
||||
if NameGuid == BuildOption[Op]:
|
||||
KeyList = Op.split('_')
|
||||
Key = KeyList[0] + '_' + KeyList[1] +'_' + KeyList[2]
|
||||
if Key in KeyStringList and KeyList[4] == 'GUID':
|
||||
if Key in KeyStringList and KeyList[4] == TAB_GUID:
|
||||
ToolPathKey = Key + '_' + KeyList[3] + '_PATH'
|
||||
ToolOptionKey = Key + '_' + KeyList[3] + '_FLAGS'
|
||||
if ToolPathKey in BuildOption:
|
||||
@ -589,7 +589,7 @@ class GenFds :
|
||||
if FdObj is None:
|
||||
for ElementFd in GenFdsGlobalVariable.FdfParser.Profile.FdDict.values():
|
||||
for ElementRegion in ElementFd.RegionList:
|
||||
if ElementRegion.RegionType == 'FV':
|
||||
if ElementRegion.RegionType == BINARY_FILE_TYPE_FV:
|
||||
for ElementRegionData in ElementRegion.RegionDataList:
|
||||
if ElementRegionData is not None and ElementRegionData.upper() == FvObj.UiFvName:
|
||||
if FvObj.BlockSizeList != []:
|
||||
@ -601,7 +601,7 @@ class GenFds :
|
||||
return DefaultBlockSize
|
||||
else:
|
||||
for ElementRegion in FdObj.RegionList:
|
||||
if ElementRegion.RegionType == 'FV':
|
||||
if ElementRegion.RegionType == BINARY_FILE_TYPE_FV:
|
||||
for ElementRegionData in ElementRegion.RegionDataList:
|
||||
if ElementRegionData is not None and ElementRegionData.upper() == FvObj.UiFvName:
|
||||
if FvObj.BlockSizeList != []:
|
||||
|
Reference in New Issue
Block a user