diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-07-26 15:17:15 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-08-02 19:39:01 +0800 |
commit | e5cf919889b92a5fb89638ea10cebbb3ef59b5c7 (patch) | |
tree | 082c0bd1149d049c5f69a189b5e0925ec85a66ff /BaseTools | |
parent | 8134f7d9d2654a49916f627783c956f3eca78421 (diff) | |
download | edk2-platforms-e5cf919889b92a5fb89638ea10cebbb3ef59b5c7.tar.xz |
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>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 9c548be9f9..921b979163 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3605,13 +3605,13 @@ class ModuleAutoGen(AutoGen): # Find all DynamicEx and PatchableInModule PCDs used by this module and dependent libraries
# Also find all packages that the DynamicEx PCDs depend on
Pcds = []
- PatchablePcds = {}
+ PatchablePcds = []
Packages = []
PcdCheckList = []
PcdTokenSpaceList = []
for Pcd in self.ModulePcdList + self.LibraryPcdList:
if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
- PatchablePcds[Pcd.TokenCName] = Pcd
+ PatchablePcds += [Pcd]
PcdCheckList.append((Pcd.TokenCName, Pcd.TokenSpaceGuidCName, 'PatchableInModule'))
elif Pcd.Type in GenC.gDynamicExPcd:
if Pcd not in Pcds:
@@ -3764,15 +3764,17 @@ class ModuleAutoGen(AutoGen): os.path.join(self.OutputDir, self.Name + '.efi')
)
if PatchList:
- for PatchPcd in PatchList:
- if PatchPcd[0] in PatchablePcds:
- key = PatchPcd[0]
- elif PatchPcd[0] + '_PatchableInModule' in PatchablePcds:
- key = PatchPcd[0] + '_PatchableInModule'
+ for Pcd in PatchablePcds:
+ TokenCName = Pcd.TokenCName
+ for PcdItem in GlobalData.MixedPcd:
+ if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in GlobalData.MixedPcd[PcdItem]:
+ TokenCName = PcdItem[0]
+ break
+ for PatchPcd in PatchList:
+ if TokenCName == PatchPcd[0]:
+ break
else:
continue
- Pcd = PatchablePcds[key]
- TokenCName = PatchPcd[0]
PcdValue = ''
if Pcd.DatumType != 'VOID*':
HexFormat = '0x%02x'
|