BaseTools: Fixed the issue of Multiple Skus are always disables
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenPcdDb.py
index b60d335..22283ef 100644 (file)
@@ -1083,9 +1083,8 @@ def CreatePcdDatabasePhaseSpecificAutoGen (Platform, DynamicPcdList, Phase):
         'SYSTEM_SKU_ID_VALUE'           : '0U'\r
     }\r
     \r
-   \r
-    SkuObj = SkuClass(Platform.Platform.SkuName, Platform.Platform.SkuIds)\r
-    Dict['SYSTEM_SKU_ID_VALUE'] = Platform.Platform.SkuIds[SkuObj.SystemSkuId][0]\r
+    SkuObj = Platform.Platform.SkuIdMgr\r
+    Dict['SYSTEM_SKU_ID_VALUE'] = 0 if SkuObj.SkuUsageType == SkuObj.SINGLE else Platform.Platform.SkuIds[SkuObj.SystemSkuId][0]\r
 \r
     Dict['PCD_INFO_FLAG'] = Platform.Platform.PcdInfoFlag\r
 \r