From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 531F9211B6C34 for ; Wed, 16 Jan 2019 16:36:36 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2019 16:36:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,488,1539673200"; d="scan'208";a="126644636" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 16 Jan 2019 16:36:35 -0800 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 16 Jan 2019 16:36:35 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 16 Jan 2019 16:36:34 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.159]) with mapi id 14.03.0415.000; Thu, 17 Jan 2019 08:36:32 +0800 From: "Feng, Bob C" To: Felix Polyudov , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [Patch v2] BaseTools: Fix incorrect formatting of GenFds command dictionary Thread-Index: AQHUrbu3Ew5LmWi5YUin0EEW5ok/hqWynZiQ Date: Thu, 17 Jan 2019 00:36:32 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16005B787@SHSMSX101.ccr.corp.intel.com> References: <20190116165116.13032-1-felixp@ami.com> In-Reply-To: <20190116165116.13032-1-felixp@ami.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch v2] BaseTools: Fix incorrect formatting of GenFds command dictionary 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: Thu, 17 Jan 2019 00:36:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng -----Original Message----- From: Felix Polyudov [mailto:felixp@ami.com]=20 Sent: Thursday, January 17, 2019 12:51 AM To: edk2-devel@lists.01.org Cc: Feng, Bob C ; Gao, Liming ;= Zhu, Yonghong Subject: [Patch v2] BaseTools: Fix incorrect formatting of GenFds command d= ictionary GenFdsCommand returned dictionary with elements that are not compatible wit= h GenFdsApi. As a result the following options were not processed by GenFdsApi: -v, -q, -d, --genfds-multi-thread, --ignore-sources The issue is introduced= by commit b3497bad1221704a5dbc5da0b10f42625f1ad2ed. V2: Remove EFI_SOURCE references Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Felix Polyudov --- BaseTools/Source/Python/AutoGen/AutoGen.py | 52 ++++++++++++++++++++++++++= +++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index cfe2d29..a795492 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3,6 +3,7 @@ # # Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
= # Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.
+# Copyright (c) 2019, American Megatrends, Inc. All rights=20 +reserved.
# # This program and the accompanying materials # are licensed and made ava= ilable under the terms and conditions of the BSD License @@ -935,7 +936,56 = @@ class WorkspaceAutoGen(AutoGen): =20 @property def GenFdsCommandDict(self): - return GenMake.TopLevelMakefile(self)._TemplateDict + FdsCommandDict =3D {} + LogLevel =3D EdkLogger.GetLevel() + if LogLevel =3D=3D EdkLogger.VERBOSE: + FdsCommandDict["verbose"] =3D True + elif LogLevel <=3D EdkLogger.DEBUG_9: + FdsCommandDict["debug"] =3D LogLevel - 1 + elif LogLevel =3D=3D EdkLogger.QUIET: + FdsCommandDict["quiet"] =3D True + + if GlobalData.gEnableGenfdsMultiThread: + FdsCommandDict["GenfdsMultiThread"] =3D True + if GlobalData.gIgnoreSource: + FdsCommandDict["IgnoreSources"] =3D True + + FdsCommandDict["OptionPcd"] =3D [] + for pcd in GlobalData.BuildOptionPcd: + if pcd[2]: + pcdname =3D '.'.join(pcd[0:3]) + else: + pcdname =3D '.'.join(pcd[0:2]) + if pcd[3].startswith('{'): + FdsCommandDict["OptionPcd"].append(pcdname + '=3D' + 'H' += '"' + pcd[3] + '"') + else: + FdsCommandDict["OptionPcd"].append(pcdname + '=3D' +=20 + pcd[3]) + + MacroList =3D [] + # macros passed to GenFds + MacroDict =3D {} + MacroDict.update(GlobalData.gGlobalDefines) + MacroDict.update(GlobalData.gCommandLineDefines) + for MacroName in MacroDict: + if MacroDict[MacroName] !=3D "": + MacroList.append('"%s=3D%s"' % (MacroName, MacroDict[Macro= Name].replace('\\', '\\\\'))) + else: + MacroList.append('"%s"' % MacroName) + FdsCommandDict["macro"] =3D MacroList + + FdsCommandDict["fdf_file"] =3D [self.FdfFile] + FdsCommandDict["build_target"] =3D self.BuildTarget + FdsCommandDict["toolchain_tag"] =3D self.ToolChain + FdsCommandDict["active_platform"] =3D str(self) + + FdsCommandDict["conf_directory"] =3D GlobalData.gConfDirectory + FdsCommandDict["build_architecture_list"] =3D ','.join(self.ArchLi= st) + FdsCommandDict["platform_build_directory"] =3D self.BuildDir + + FdsCommandDict["fd"] =3D self.FdTargetList + FdsCommandDict["fv"] =3D self.FvTargetList + FdsCommandDict["cap"] =3D self.CapTargetList + return FdsCommandDict =20 ## Create makefile for the platform and modules in it # -- 2.10.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry to American Megatrends, Inc. This communication is intended to be read = only by the individual or entity to whom it is addressed or by their design= ee. If the reader of this message is not the intended recipient, you are on= notice that any distribution of this message, in any form, is strictly pro= hibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= .