For the same one VOID* pcd, if the default value type of one sku is "unicode string", the other skus are "OtherVOID*"(ascii string or byte array),Then covert "unicode string" to "byte array".
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <[email protected]> Cc: Liming Gao <[email protected]> Cc: Yonghong Zhu <[email protected]> Reviewed-by: Bob Feng <[email protected]> --- BaseTools/Source/Python/Workspace/DscBuildData.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 7854e71db6..9b783de84b 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -2877,6 +2877,15 @@ class DscBuildData(PlatformBuildClassObject): elif TAB_DEFAULT in pcd.SkuInfoList and TAB_COMMON in pcd.SkuInfoList: del pcd.SkuInfoList[TAB_COMMON] + #For the same one VOID* pcd, if the default value type of one sku is "unicode string", + #the other skus are "OtherVOID*"(ascii string or byte array),Then covert "unicode string" to "byte array". + for pcd in Pcds.values(): + PcdValueTypeList = [] + for sku in pcd.SkuInfoList.values(): + PcdValueTypeList.append("UnicodeString" if sku.DefaultValue.startswith("L") else "OtherVOID*") + if "UnicodeString" in PcdValueTypeList and "OtherVOID*" in PcdValueTypeList: + for sku in pcd.SkuInfoList.values(): + sku.DefaultValue = StringToArray(sku.DefaultValue) if sku.DefaultValue.startswith("L") else sku.DefaultValue map(self.FilterSkuSettings, Pcds.values()) return Pcds -- 2.14.1.windows.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

