summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg/Tools
diff options
context:
space:
mode:
authorChasel, Chiu <chasel.chiu@intel.com>2018-09-26 10:52:36 +0800
committerChasel, Chiu <chasel.chiu@intel.com>2018-09-28 11:58:49 +0800
commitccacc4d273dee8f376385505373b649ace7f5b26 (patch)
tree0e81054718fdd8014e9e6c4219d92bc0af8bd9bc /IntelFsp2Pkg/Tools
parent4063d37c6a96f534abb0d2861776648fb453ca4d (diff)
downloadedk2-ccacc4d273dee8f376385505373b649ace7f5b26.tar.gz
edk2-ccacc4d273dee8f376385505373b649ace7f5b26.tar.bz2
edk2-ccacc4d273dee8f376385505373b649ace7f5b26.zip
IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1210 FixedAtBuild PCD is suggested to be used instead of FeatureFlag PCD so extend this tool to support. Also skipped PCDs which commented out by '#'. Test: Verified with FixedAtBuild PCD for including or excluding lines in generated UPD header files successfully. Cc: Jiewen Yao <Jiewen.yao@intel.com> Cc: Gao Liming <liming.gao@intel.com> Cc: Zhu Yonghong <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Diffstat (limited to 'IntelFsp2Pkg/Tools')
-rw-r--r--IntelFsp2Pkg/Tools/GenCfgOpt.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py
index c9b7bc5373..32cf63ff03 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -1,6 +1,6 @@
## @ GenCfgOpt.py
#
-# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials are licensed and made available under
# the terms and conditions of the BSD License that accompanies this distribution.
# The full text of the license may be found at
@@ -449,7 +449,7 @@ EndList
IsUpdSect = False
if Match.group(1).lower() == "Defines".lower():
IsDefSect = True
- if Match.group(1).lower() == "PcdsFeatureFlag".lower():
+ if (Match.group(1).lower() == "PcdsFeatureFlag".lower() or Match.group(1).lower() == "PcdsFixedAtBuild".lower()):
IsPcdSect = True
elif Match.group(1).lower() == "PcdsDynamicVpd.Upd".lower():
ConfigDict = {}
@@ -491,7 +491,7 @@ EndList
IfStack.append(Result)
ElifStack.append(0)
else:
- Match = re.match("!(if|elseif)\s+(.+)", DscLine)
+ Match = re.match("!(if|elseif)\s+(.+)", DscLine.split("#")[0])
if Match:
Result = self.EvaluateExpress(Match.group(2))
if Match.group(1) == "if":