diff options
author | Liming Gao <liming.gao@intel.com> | 2017-12-18 12:42:41 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2017-12-25 11:05:52 +0800 |
commit | 67e63e9a7b3620fc5fdd3df61b4477a8cd5bc944 (patch) | |
tree | aa92fff67cf6ccb545a85d3b3bf50eb4e50db7b0 /BaseTools | |
parent | 0b6c5954e1d9a17e01eee7d5ef840a5b4790e2e8 (diff) | |
download | edk2-67e63e9a7b3620fc5fdd3df61b4477a8cd5bc944.tar.gz edk2-67e63e9a7b3620fc5fdd3df61b4477a8cd5bc944.tar.bz2 edk2-67e63e9a7b3620fc5fdd3df61b4477a8cd5bc944.zip |
BaseTools: Correct PCD generation logic to make sure DB is use
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DscBuildData.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index d8a7d09306..7594b45771 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1014,6 +1014,17 @@ class DscBuildData(PlatformBuildClassObject): for stru_pcd in S_pcd_set.values():
if stru_pcd.Type not in DynamicPcdType:
continue
+ for skuid in SkuIds:
+ if skuid in stru_pcd.SkuOverrideValues:
+ continue
+ nextskuid = self.SkuIdMgr.GetNextSkuId(skuid)
+ NoDefault = False
+ while nextskuid not in stru_pcd.SkuOverrideValues:
+ if nextskuid == "DEFAULT":
+ NoDefault = True
+ break
+ nextskuid = self.SkuIdMgr.GetNextSkuId(nextskuid)
+ stru_pcd.SkuOverrideValues[skuid] = copy.deepcopy(stru_pcd.SkuOverrideValues[nextskuid]) if not NoDefault else copy.deepcopy({defaultstorename: stru_pcd.DefaultValues for defaultstorename in DefaultStores} if DefaultStores else {'STANDARD':stru_pcd.DefaultValues})
if stru_pcd.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_HII], self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX_HII]]:
for skuid in SkuIds:
nextskuid = skuid
@@ -1024,7 +1035,6 @@ class DscBuildData(PlatformBuildClassObject): NoDefault = True
break
nextskuid = self.SkuIdMgr.GetNextSkuId(nextskuid)
- stru_pcd.SkuOverrideValues[skuid] = {}
if NoDefault:
continue
PcdDefaultStoreSet = set([defaultstorename for defaultstorename in stru_pcd.SkuOverrideValues[nextskuid]])
@@ -1033,23 +1043,13 @@ class DscBuildData(PlatformBuildClassObject): for defaultstoreid in DefaultStores:
if defaultstoreid not in stru_pcd.SkuOverrideValues[skuid]:
stru_pcd.SkuOverrideValues[skuid][defaultstoreid] = copy.deepcopy(stru_pcd.SkuOverrideValues[nextskuid][mindefaultstorename])
- for skuid in SkuIds:
- if skuid in stru_pcd.SkuOverrideValues:
- continue
- nextskuid = self.SkuIdMgr.GetNextSkuId(skuid)
- NoDefault = False
- while nextskuid not in stru_pcd.SkuOverrideValues:
- if nextskuid == "DEFAULT":
- NoDefault = True
- break
- nextskuid = self.SkuIdMgr.GetNextSkuId(nextskuid)
- stru_pcd.SkuOverrideValues[skuid] = copy.deepcopy(stru_pcd.SkuOverrideValues[nextskuid]) if not NoDefault else copy.deepcopy({defaultstorename: stru_pcd.DefaultValues for defaultstorename in DefaultStores})
Str_Pcd_Values = self.GenerateByteArrayValue(S_pcd_set)
if Str_Pcd_Values:
for (skuname,StoreName,PcdGuid,PcdName,PcdValue) in Str_Pcd_Values:
str_pcd_obj = S_pcd_set.get((PcdName, PcdGuid))
if str_pcd_obj is None:
+ print PcdName, PcdGuid
raise
if str_pcd_obj.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_HII],
self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX_HII]]:
|