From: Feng, Bob C Date: Thu, 1 Nov 2018 15:07:01 +0000 (+0800) Subject: BaseTools: Add checking to EFI variable attribute. X-Git-Tag: edk2-stable201903~663 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=5af5153ad9553ce7ed4f241a83d1a4b870833960 BaseTools: Add checking to EFI variable attribute. This patch is going to add a check that only if the attribute of a EFI variable include 'NV', it will be added into PcdNvStoreDefaultValueBuffer. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 9c3759c0f5..a1c8dc7efb 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1165,6 +1165,8 @@ class PlatformAutoGen(AutoGen): if SkuId is None or SkuId == '': continue if len(Sku.VariableName) > 0: + if Sku.VariableAttribute and 'NV' not in Sku.VariableAttribute: + continue VariableGuidStructure = Sku.VariableGuidValue VariableGuid = GuidStructureStringToGuidString(VariableGuidStructure) for StorageName in Sku.DefaultStoreDict: