From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=chasel.chiu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 38D0A21B02822 for ; Tue, 25 Sep 2018 20:05:14 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 20:05:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,304,1534834800"; d="scan'208";a="260270143" Received: from cchiu4-mobl1.gar.corp.intel.com ([10.5.240.23]) by orsmga005.jf.intel.com with ESMTP; 25 Sep 2018 20:05:13 -0700 From: "Chasel, Chiu" To: edk2-devel@lists.01.org Cc: Jiewen Yao , Gao Liming , Zhu Yonghong , Chasel Chiu Date: Wed, 26 Sep 2018 11:05:03 +0800 Message-Id: <20180926030503.112-1-chasel.chiu@intel.com> X-Mailer: git-send-email 2.13.3.windows.1 Subject: [PATCH] IntelFsp2Pkg/GenCfgOpt.py: support FixedAtBuild PCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 03:05:15 -0000 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 Cc: Gao Liming Cc: Zhu Yonghong Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chasel Chiu --- 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.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# 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