From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=63.147.10.40; helo=atlmailgw1.ami.com; envelope-from=felixp@ami.com; receiver=edk2-devel@lists.01.org Received: from atlmailgw1.ami.com (atlmailgw1.ami.com [63.147.10.40]) (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 7B457211B5A25 for ; Wed, 16 Jan 2019 08:51:20 -0800 (PST) X-AuditID: ac1060b2-78bff70000002bc0-75-5c3f61077159 Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id 55.B7.11200.7016F3C5; Wed, 16 Jan 2019 11:51:19 -0500 (EST) Received: from Felix7.us.megatrends.com (172.16.99.93) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.408.0; Wed, 16 Jan 2019 11:51:16 -0500 From: Felix Polyudov To: CC: , , Date: Wed, 16 Jan 2019 11:51:16 -0500 Message-ID: <20190116165116.13032-1-felixp@ami.com> X-Mailer: git-send-email 2.10.0.windows.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJIsWRmVeSWpSXmKPExsWyRiBhgi57on2MwexuMYtfR+exWew5dJTZ YsW9DewW+zvSHFg8Fu95yeTRPfsfSwBTVAOjTWJeXn5JYkmqQkpqcbKtUkBRZllicqWSQmaK rZKhkkJBTmJyam5qXomtUmJBQWpeipIdlwIGsAEqy8xTSM1Lzk/JzEu3VfIM9te1sDC11DVU sgvJSFXIzEvLL8pNLMnMz1NIzs8rAapOTQGKKiR0cWa8Pn+SuWClTMXpaX2sDYz7RLsYOTkk BEwk1r48xARiCwnsYpK4+N26i5ELyN7AKPFpz2k2kASbgKrElomrWEBsEQFZiT+dn8BsZgEf if2/zrKD2MICIRJNJ1ezgtgsQPUdW9czgti8AsYSFz8tZ4RYpikxfdZrZoi4oMTJmU+g5khI HHzxghniCGmJsw9/M05g5J2FpGwWkrIFjEyrGIUSS3JyEzNz0ssN9RJzM/WS83M3MUJiZtMO xpaL5ocYBTgYlXh4D0TZxwixJpYVV+YeYpTgYFYS4f25xC5GiDclsbIqtSg/vqg0J7X4EKMT 0NkTmaW4QcEGjId4YwMDKVEYx9DEzMTcyNzQ0sTc2FhJnDdf7VOUkEA6MD6zU1MLUotghjBx cEo1MBbr2ApwxWwtfPkwMOBE9fyZ33cIfzS4ZLn088WLW9fs3BfjcyO7Uq51Xt86tkdvXNeV ne1P1WQMWvZ4e25zi571rh+zdNPtN29492/JixlOjD+u1nK8mXt7Z8LxUgG/JT8uPJThF5+Y ImfVvNLd/J6TWtX/GiG2oIj0FuGJ/Xs8eZgSp0h+5FNiKc5INNRiLipOBADLkdE2vAIAAA== Subject: [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: Wed, 16 Jan 2019 16:51:20 -0000 Content-Type: text/plain 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 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 reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -935,7 +936,56 @@ class WorkspaceAutoGen(AutoGen): @property def GenFdsCommandDict(self): - return GenMake.TopLevelMakefile(self)._TemplateDict + FdsCommandDict = {} + LogLevel = EdkLogger.GetLevel() + if LogLevel == EdkLogger.VERBOSE: + FdsCommandDict["verbose"] = True + elif LogLevel <= EdkLogger.DEBUG_9: + FdsCommandDict["debug"] = LogLevel - 1 + elif LogLevel == EdkLogger.QUIET: + FdsCommandDict["quiet"] = True + + if GlobalData.gEnableGenfdsMultiThread: + FdsCommandDict["GenfdsMultiThread"] = True + if GlobalData.gIgnoreSource: + FdsCommandDict["IgnoreSources"] = True + + FdsCommandDict["OptionPcd"] = [] + for pcd in GlobalData.BuildOptionPcd: + if pcd[2]: + pcdname = '.'.join(pcd[0:3]) + else: + pcdname = '.'.join(pcd[0:2]) + if pcd[3].startswith('{'): + FdsCommandDict["OptionPcd"].append(pcdname + '=' + 'H' + '"' + pcd[3] + '"') + else: + FdsCommandDict["OptionPcd"].append(pcdname + '=' + pcd[3]) + + MacroList = [] + # macros passed to GenFds + MacroDict = {} + MacroDict.update(GlobalData.gGlobalDefines) + MacroDict.update(GlobalData.gCommandLineDefines) + for MacroName in MacroDict: + if MacroDict[MacroName] != "": + MacroList.append('"%s=%s"' % (MacroName, MacroDict[MacroName].replace('\\', '\\\\'))) + else: + MacroList.append('"%s"' % MacroName) + FdsCommandDict["macro"] = MacroList + + FdsCommandDict["fdf_file"] = [self.FdfFile] + FdsCommandDict["build_target"] = self.BuildTarget + FdsCommandDict["toolchain_tag"] = self.ToolChain + FdsCommandDict["active_platform"] = str(self) + + FdsCommandDict["conf_directory"] = GlobalData.gConfDirectory + FdsCommandDict["build_architecture_list"] = ','.join(self.ArchList) + FdsCommandDict["platform_build_directory"] = self.BuildDir + + FdsCommandDict["fd"] = self.FdTargetList + FdsCommandDict["fv"] = self.FvTargetList + FdsCommandDict["cap"] = 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 to be read only by the individual or entity to whom it is addressed or by their 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 telephone at 770-246-8600, and then delete or destroy all copies of the transmission.