public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chasel, Chiu" <chasel.chiu@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiewen Yao <Jiewen.yao@intel.com>,
	Gao Liming <liming.gao@intel.com>,
	Zhu Yonghong <yonghong.zhu@intel.com>,
	Chasel Chiu <chasel.chiu@intel.com>
Subject: [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD
Date: Wed, 26 Sep 2018 11:05:03 +0800	[thread overview]
Message-ID: <20180926030503.112-1-chasel.chiu@intel.com> (raw)

FixedAtBuild PCD is suggested to be used instead
of FeatureFlag PCD so extend this tool to support.
Also skipped PCDs which commented out by '#'.

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>
---
 IntelFsp2Pkg/Tools/GenCfgOpt.py | 6 +++---
 1 file 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":
-- 
2.13.3.windows.1



             reply	other threads:[~2018-09-26  3:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  3:05 Chasel, Chiu [this message]
2018-09-26  3:13 ` [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD Yao, Jiewen
  -- strict thread matches above, loose matches on Subject: below --
2018-09-26  5:24 Chasel, Chiu
2018-09-26  7:23 ` Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180926030503.112-1-chasel.chiu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox