BaseTools: Fixed some small issues

1. The structure pcd default value should use the default value under sku.
2. Incorrect VpdOffset value for those un-used in module Vpd
3. Add a checkpoint for Structure Pcd Name

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Feng, Bob C
2018-01-23 11:34:45 +08:00
committed by Liming Gao
parent 841d86fe40
commit 8e011d83bb
3 changed files with 10 additions and 4 deletions

View File

@ -1298,8 +1298,11 @@ class DscBuildData(PlatformBuildClassObject):
CApp = CApp + ' %s *Pcd; // From %s Line %d \n' % (Pcd.DatumType, Pcd.PkgPath, Pcd.PcdDefineLineNo)
CApp = CApp + '\n'
Pcd.DefaultValue = Pcd.DefaultValue.strip()
PcdDefaultValue = StringToArray(Pcd.DefaultValue)
if SkuName in Pcd.SkuInfoList:
DefaultValue = Pcd.SkuInfoList[SkuName].DefaultStoreDict.get(DefaultStoreName,Pcd.SkuInfoList[SkuName].HiiDefaultValue) if Pcd.SkuInfoList[SkuName].HiiDefaultValue else Pcd.SkuInfoList[SkuName].DefaultValue
else:
DefaultValue = Pcd.DefaultValue
PcdDefaultValue = StringToArray(DefaultValue.strip())
InitByteValue += '%s.%s.%s.%s|%s|%s\n' % (SkuName, DefaultStoreName, Pcd.TokenSpaceGuidCName, Pcd.TokenCName, Pcd.DatumType, PcdDefaultValue)