summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Common/Misc.py
diff options
context:
space:
mode:
authorBob Feng <bob.c.feng@intel.com>2015-04-10 07:06:13 +0000
committerbobfeng <bobfeng@Edk2>2015-04-10 07:06:13 +0000
commit1ae469b9ed59306f43419e2beb4a547399c096ac (patch)
tree05d6dfffc25ab49279d9456c4a3d97dfbeda3bca /BaseTools/Source/Python/Common/Misc.py
parent82a6a9605c35f814bd6187979980258ed1b75abd (diff)
downloadedk2-platforms-1ae469b9ed59306f43419e2beb4a547399c096ac.tar.xz
BaseTools/Build: Add all support skuid to the Pcd DB system skuid table
Update PcdDataBase System SkuIdTable. The system SkuId Table should have all the platform supported skuid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Bob Feng" <bob.c.feng@intel.com> Reviewed-by: "Chen, Hesheng" <hesheng.chen@intel.com> Reviewed-by: "Liu, Yingke D" <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17159 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Common/Misc.py')
-rw-r--r--BaseTools/Source/Python/Common/Misc.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 79073e2fef..fc1680b5ed 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -1955,17 +1955,26 @@ class SkuClass():
self.AvailableSkuIds = sdict()
self.SkuIdSet = []
-
+ self.SkuIdNumberSet = []
if SkuIdentifier == '' or SkuIdentifier is None:
self.SkuIdSet = ['DEFAULT']
+ self.SkuIdNumberSet = ['0U']
elif SkuIdentifier == 'ALL':
self.SkuIdSet = SkuIds.keys()
+ self.SkuIdNumberSet = [num.strip() + 'U' for num in SkuIds.values()]
else:
r = SkuIdentifier.split('|')
self.SkuIdSet=[r[k].strip() for k in range(len(r))]
+ k = None
+ try:
+ self.SkuIdNumberSet = [SkuIds[k].strip() + 'U' for k in self.SkuIdSet]
+ except Exception:
+ EdkLogger.error("build", PARAMETER_INVALID,
+ ExtraData = "SKU-ID [%s] is not supported by the platform. [Valid SKU-ID: %s]"
+ % (k, " ".join(SkuIds.keys())))
if len(self.SkuIdSet) == 2 and 'DEFAULT' in self.SkuIdSet and SkuIdentifier != 'ALL':
self.SkuIdSet.remove('DEFAULT')
-
+ self.SkuIdNumberSet.remove('0U')
for each in self.SkuIdSet:
if each in SkuIds:
self.AvailableSkuIds[each] = SkuIds[each]
@@ -1992,11 +2001,12 @@ class SkuClass():
return self.SkuIdSet[0]
else:
return 'DEFAULT'
-
+ def __GetAvailableSkuIdNumber(self):
+ return self.SkuIdNumberSet
SystemSkuId = property(__GetSystemSkuID)
AvailableSkuIdSet = property(__GetAvailableSkuIds)
SkuUsageType = property(__SkuUsageType)
-
+ AvailableSkuIdNumSet = property(__GetAvailableSkuIdNumber)
##
#
# This acts like the main() function for the script, unless it is 'import'ed into another