diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2018-01-23 11:34:45 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-01-25 18:08:07 +0800 |
commit | 8e011d83bbd7006919c00917fbdfaf7a60edae21 (patch) | |
tree | 36125d90add09ca93fd05a5e79c8ee2f6c8873bc /BaseTools/Source/Python/Workspace/DscBuildData.py | |
parent | 841d86fe406ed6cf504c62b6838876a65cf8f7a0 (diff) | |
download | edk2-8e011d83bbd7006919c00917fbdfaf7a60edae21.tar.gz edk2-8e011d83bbd7006919c00917fbdfaf7a60edae21.tar.bz2 edk2-8e011d83bbd7006919c00917fbdfaf7a60edae21.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DscBuildData.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index c8dba63015..f30d3f7e73 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -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)
|