mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
BaseTools: Update build report for StructurePcd value
Update build report to display the structure Pcd value that from FDF file. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
parent
3b46dd93dd
commit
39f0156fce
@ -968,7 +968,6 @@ class PcdReport(object):
|
|||||||
if CName == PcdTokenCName and Guid == Key:
|
if CName == PcdTokenCName and Guid == Key:
|
||||||
DscDefaultValue = self.FdfPcdSet[(CName, Guid, Field)]
|
DscDefaultValue = self.FdfPcdSet[(CName, Guid, Field)]
|
||||||
break
|
break
|
||||||
DscDefaultValue = self.FdfPcdSet.get((Pcd.TokenCName, Key), DscDefaultValue)
|
|
||||||
if DscDefaultValue != DscDefaultValBak:
|
if DscDefaultValue != DscDefaultValBak:
|
||||||
try:
|
try:
|
||||||
DscDefaultValue = ValueExpressionEx(DscDefaultValue, Pcd.DatumType, self._GuidDict)(True)
|
DscDefaultValue = ValueExpressionEx(DscDefaultValue, Pcd.DatumType, self._GuidDict)(True)
|
||||||
@ -1084,8 +1083,13 @@ class PcdReport(object):
|
|||||||
if DscOverride:
|
if DscOverride:
|
||||||
break
|
break
|
||||||
if DscOverride:
|
if DscOverride:
|
||||||
|
DscDefaultValue = True
|
||||||
DscMatch = True
|
DscMatch = True
|
||||||
DecMatch = False
|
DecMatch = False
|
||||||
|
else:
|
||||||
|
DscDefaultValue = True
|
||||||
|
DscMatch = True
|
||||||
|
DecMatch = False
|
||||||
|
|
||||||
#
|
#
|
||||||
# Report PCD item according to their override relationship
|
# Report PCD item according to their override relationship
|
||||||
@ -1352,16 +1356,22 @@ class PcdReport(object):
|
|||||||
OverrideFieldStruct[Key] = Values
|
OverrideFieldStruct[Key] = Values
|
||||||
if Pcd.PcdFieldValueFromFdf:
|
if Pcd.PcdFieldValueFromFdf:
|
||||||
for Key, Values in Pcd.PcdFieldValueFromFdf.items():
|
for Key, Values in Pcd.PcdFieldValueFromFdf.items():
|
||||||
|
if Key in OverrideFieldStruct and Values[0] == OverrideFieldStruct[Key][0]:
|
||||||
|
continue
|
||||||
OverrideFieldStruct[Key] = Values
|
OverrideFieldStruct[Key] = Values
|
||||||
if Pcd.PcdFieldValueFromComm:
|
if Pcd.PcdFieldValueFromComm:
|
||||||
for Key, Values in Pcd.PcdFieldValueFromComm.items():
|
for Key, Values in Pcd.PcdFieldValueFromComm.items():
|
||||||
|
if Key in OverrideFieldStruct and Values[0] == OverrideFieldStruct[Key][0]:
|
||||||
|
continue
|
||||||
OverrideFieldStruct[Key] = Values
|
OverrideFieldStruct[Key] = Values
|
||||||
return OverrideFieldStruct
|
return OverrideFieldStruct
|
||||||
|
|
||||||
def PrintStructureInfo(self, File, Struct):
|
def PrintStructureInfo(self, File, Struct):
|
||||||
for Key, Value in Struct.items():
|
for Key, Value in sorted(Struct.items(), key=lambda x: x[0]):
|
||||||
if Value[1] and 'build command options' in Value[1]:
|
if Value[1] and 'build command options' in Value[1]:
|
||||||
FileWrite(File, ' *B %-*s = %s' % (self.MaxLen + 4, '.' + Key, Value[0]))
|
FileWrite(File, ' *B %-*s = %s' % (self.MaxLen + 4, '.' + Key, Value[0]))
|
||||||
|
elif Value[1] and Value[1].endswith('.fdf'):
|
||||||
|
FileWrite(File, ' *F %-*s = %s' % (self.MaxLen + 4, '.' + Key, Value[0]))
|
||||||
else:
|
else:
|
||||||
FileWrite(File, ' %-*s = %s' % (self.MaxLen + 4, '.' + Key, Value[0]))
|
FileWrite(File, ' %-*s = %s' % (self.MaxLen + 4, '.' + Key, Value[0]))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user