mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 08:04:07 +02:00
BaseTools: Keep the Pcd order in the Asbuilt Inf is same with Source
The original behavior is that in the Asbuilt inf Pcd's order is base on the Pcd's offset. Now we change the order to keep it is same with the Pcd order in the source inf file. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
8134f7d9d2
commit
e5cf919889
@ -3605,13 +3605,13 @@ class ModuleAutoGen(AutoGen):
|
|||||||
# Find all DynamicEx and PatchableInModule PCDs used by this module and dependent libraries
|
# Find all DynamicEx and PatchableInModule PCDs used by this module and dependent libraries
|
||||||
# Also find all packages that the DynamicEx PCDs depend on
|
# Also find all packages that the DynamicEx PCDs depend on
|
||||||
Pcds = []
|
Pcds = []
|
||||||
PatchablePcds = {}
|
PatchablePcds = []
|
||||||
Packages = []
|
Packages = []
|
||||||
PcdCheckList = []
|
PcdCheckList = []
|
||||||
PcdTokenSpaceList = []
|
PcdTokenSpaceList = []
|
||||||
for Pcd in self.ModulePcdList + self.LibraryPcdList:
|
for Pcd in self.ModulePcdList + self.LibraryPcdList:
|
||||||
if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
|
if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
|
||||||
PatchablePcds[Pcd.TokenCName] = Pcd
|
PatchablePcds += [Pcd]
|
||||||
PcdCheckList.append((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, 'PatchableInModule'))
|
PcdCheckList.append((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, 'PatchableInModule'))
|
||||||
elif Pcd.Type in GenC.gDynamicExPcd:
|
elif Pcd.Type in GenC.gDynamicExPcd:
|
||||||
if Pcd not in Pcds:
|
if Pcd not in Pcds:
|
||||||
@ -3764,15 +3764,17 @@ class ModuleAutoGen(AutoGen):
|
|||||||
os.path.join(self.OutputDir, self.Name + '.efi')
|
os.path.join(self.OutputDir, self.Name + '.efi')
|
||||||
)
|
)
|
||||||
if PatchList:
|
if PatchList:
|
||||||
for PatchPcd in PatchList:
|
for Pcd in PatchablePcds:
|
||||||
if PatchPcd[0] in PatchablePcds:
|
TokenCName = Pcd.TokenCName
|
||||||
key = PatchPcd[0]
|
for PcdItem in GlobalData.MixedPcd:
|
||||||
elif PatchPcd[0] + '_PatchableInModule' in PatchablePcds:
|
if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in GlobalData.MixedPcd[PcdItem]:
|
||||||
key = PatchPcd[0] + '_PatchableInModule'
|
TokenCName = PcdItem[0]
|
||||||
|
break
|
||||||
|
for PatchPcd in PatchList:
|
||||||
|
if TokenCName == PatchPcd[0]:
|
||||||
|
break
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
Pcd = PatchablePcds[key]
|
|
||||||
TokenCName = PatchPcd[0]
|
|
||||||
PcdValue = ''
|
PcdValue = ''
|
||||||
if Pcd.DatumType != 'VOID*':
|
if Pcd.DatumType != 'VOID*':
|
||||||
HexFormat = '0x%02x'
|
HexFormat = '0x%02x'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user