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.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 DD849211B7F67 for ; Tue, 15 Jan 2019 18:19:36 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2019 18:19:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,484,1539673200"; d="scan'208";a="108574915" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 15 Jan 2019 18:19: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; Tue, 15 Jan 2019 18:19:35 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 15 Jan 2019 18:19:34 -0800 Received: from shsmsx152.ccr.corp.intel.com ([169.254.6.44]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.85]) with mapi id 14.03.0415.000; Wed, 16 Jan 2019 10:19:33 +0800 From: "Gao, Liming" To: Felix Polyudov , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Fix incorrect formatting of GenFds command dictionary Thread-Index: AQHUrSqlXlXsA8gfBUWqRBREimgexKWxKPXA Date: Wed, 16 Jan 2019 02:19:32 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B290D@SHSMSX152.ccr.corp.intel.com> References: <20190115233241.53544-1-felixp@ami.com> In-Reply-To: <20190115233241.53544-1-felixp@ami.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] 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: Wed, 16 Jan 2019 02:19:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Please update the patch to remove EFI_SOURCE. This has been removed from ed= k2 master.=20 Thanks Liming >-----Original Message----- >From: Felix Polyudov [mailto:felixp@ami.com] >Sent: Wednesday, January 16, 2019 7:33 AM >To: edk2-devel@lists.01.org >Cc: Feng, Bob C ; Gao, Liming >; Zhu, Yonghong >Subject: [Patch] BaseTools: Fix incorrect formatting of GenFds command >dictionary > >The issue is introduced by commit >b3497bad1221704a5dbc5da0b10f42625f1ad2ed. >GenFdsCommand returned dictionary with elements that >are not compatible with GenFdsApi. >As a result the following options were not processed by GenFdsApi: >-v, -q, -d, --genfds-multi-thread, --ignore-sources > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Felix Polyudov >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 54 >+++++++++++++++++++++++++++++- > 1 file changed, 53 insertions(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py >b/BaseTools/Source/Python/AutoGen/AutoGen.py >index cfe2d29..db3717d 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 reserved.
> # > # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the B= SD >License >@@ -935,7 +936,58 @@ class WorkspaceAutoGen(AutoGen): > > @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' + pcd[= 3]) >+ >+ MacroList =3D [] >+ # macros passed to GenFds >+ MacroList.append('"%s=3D%s"' % ("EFI_SOURCE", >GlobalData.gEfiSource.replace('\\', '\\\\'))) >+ MacroDict =3D {} >+ MacroDict.update(GlobalData.gGlobalDefines) >+ MacroDict.update(GlobalData.gCommandLineDefines) >+ MacroDict.pop("EFI_SOURCE", "dummy") >+ for MacroName in MacroDict: >+ if MacroDict[MacroName] !=3D "": >+ MacroList.append('"%s=3D%s"' % (MacroName, >MacroDict[MacroName].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.ArchL= ist) >+ FdsCommandDict["platform_build_directory"] =3D self.BuildDir >+ >+ FdsCommandDict["fd"] =3D self.FdTargetList >+ FdsCommandDict["fv"] =3D self.FvTargetList >+ FdsCommandDict["cap"] =3D self.CapTargetList >+ return FdsCommandDict > > ## 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 >proprietary to American Megatrends, Inc. This communication is intended t= o >be read only by the individual or entity to whom it is addressed or by the= ir >designee. 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 >prohibited. Please promptly notify the sender by reply e-mail or by telep= hone >at 770-246-8600, and then delete or destroy all copies of the transmission= .