summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2017-12-01 22:00:07 +0800
committerLiming Gao <liming.gao@intel.com>2017-12-25 11:05:50 +0800
commit65eff519e5ef56ddf51b11ed3524f55854e49dde (patch)
treefa17cbce46ed3d1ba7882ad6be95784f08a1a14f /BaseTools/Source/Python/AutoGen
parent626bece451db2e2a19fa7696889ad4d4c441b16e (diff)
downloadedk2-65eff519e5ef56ddf51b11ed3524f55854e49dde.tar.gz
edk2-65eff519e5ef56ddf51b11ed3524f55854e49dde.tar.bz2
edk2-65eff519e5ef56ddf51b11ed3524f55854e49dde.zip
BaseTools: Fixed the issue of Multiple Skus are always disables
When multiple skus are enabled, PCD database should record the supported SKUs. This patch fixes PCD database to add the missing supported SKUs. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@Intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py3
-rw-r--r--BaseTools/Source/Python/AutoGen/GenPcdDb.py5
2 files changed, 4 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 63cda5a8ac..28e575d219 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1842,7 +1842,8 @@ class PlatformAutoGen(AutoGen):
for (SkuName,SkuId) in allskuset:
if type(SkuId) in (str,unicode) and eval(SkuId) == 0 or SkuId == 0:
continue
- pcd.SkuInfoList[SkuName] = pcd.SkuInfoList['DEFAULT']
+ pcd.SkuInfoList[SkuName] = copy.deepcopy(pcd.SkuInfoList['DEFAULT'])
+ pcd.SkuInfoList[SkuName].SkuId = SkuId
self.AllPcdList = self._NonDynamicPcdList + self._DynamicPcdList
def FixVpdOffset(self,VpdFile ):
diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
index b60d33526a..22283ef7fe 100644
--- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py
+++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
@@ -1083,9 +1083,8 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
'SYSTEM_SKU_ID_VALUE' : '0U'
}
-
- SkuObj = SkuClass(Platform.Platform.SkuName, Platform.Platform.SkuIds)
- Dict['SYSTEM_SKU_ID_VALUE'] = Platform.Platform.SkuIds[SkuObj.SystemSkuId][0]
+ SkuObj = Platform.Platform.SkuIdMgr
+ Dict['SYSTEM_SKU_ID_VALUE'] = 0 if SkuObj.SkuUsageType == SkuObj.SINGLE else Platform.Platform.SkuIds[SkuObj.SystemSkuId][0]
Dict['PCD_INFO_FLAG'] = Platform.Platform.PcdInfoFlag