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.42; helo=atlmailgw2.ami.com; envelope-from=felixp@ami.com; receiver=edk2-devel@lists.01.org Received: from atlmailgw2.ami.com (atlmailgw2.ami.com [63.147.10.42]) (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 7F3B5211B76DB for ; Tue, 15 Jan 2019 15:32:43 -0800 (PST) X-AuditID: ac10606f-64fff700000073c3-f2-5c3e6d99240d 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 atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id D2.87.29635.99D6E3C5; Tue, 15 Jan 2019 18:32:42 -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; Tue, 15 Jan 2019 18:32:41 -0500 From: Felix Polyudov To: CC: , , Date: Tue, 15 Jan 2019 18:32:41 -0500 Message-ID: <20190115233241.53544-1-felixp@ami.com> X-Mailer: git-send-email 2.10.0.windows.1 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRmVeSWpSXmKPExsWyRiBhgu6sXLsYg29fmSx+HZ3HZrHn0FFm ixX3NrBb7O9Ic2DxWLznJZNH9+x/LAFMUQ2MNol5efkliSWpCimpxcm2SgFFmWWJyZVKCpkp tkqGSgoFOYnJqbmpeSW2SokFBal5KUp2XAoYwAaoLDNPITUvOT8lMy/dVskz2F/XwsLUUtdQ yS4kI1UhMy8tvyg3sSQzP08hOT+vBKg6NQUoqpDQxZnR0hFWMEO24vLL1UwNjLPFuhg5OCQE TCQmdnt1MXJxCAnsYpJ4eWsmaxcjJ5CzgVGie3YiiM0moCqxZeIqFhBbREBW4k/nJzCbWcBH Yv+vs+wgtrBAoMSWndPZQGwWoPqdy54ygti8AsYSTxbvBauXENCUmD7rNTNEXFDi5MwnUHMk JA6+eMEMsVda4uzD34wTGHlnISmbhaRsASPTKkahxJKc3MTMnPRyI73E3Ey95PzcTYyQeMnf wfjxo/khRgEORiUeXq0suxgh1sSy4srcQ4wSHMxKIrxlTjYxQrwpiZVVqUX58UWlOanFhxid gM6eyCzFDQo0YCzEGxsYSInCOIYmZibmRuaGlibmxsZK4rz5ap+ihATSgbGZnZpakFoEM4SJ g1OqgTHPk3sl02/Zv4Lv7z87KitwsnLam6s5e+fe8fWer+GdmMAzIcbOe9erx38XTq5fdTw+ Iu5e8VOJ5c3Hv9psuKKwWPNR2Kv3uZWn3LZPVblWt6f6v2FcbOLUXWtqqovTTrtbzxNd/fzH o6dB3p/ZXlqmeS9xCPWqdT1679vf5L5PcpM5pU6qOL5VYinOSDTUYi4qTgQAMpAdi7oCAAA= Subject: [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: Tue, 15 Jan 2019 23:32:43 -0000 Content-Type: text/plain 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 BSD License @@ -935,7 +936,58 @@ 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 + MacroList.append('"%s=%s"' % ("EFI_SOURCE", GlobalData.gEfiSource.replace('\\', '\\\\'))) + MacroDict = {} + MacroDict.update(GlobalData.gGlobalDefines) + MacroDict.update(GlobalData.gCommandLineDefines) + MacroDict.pop("EFI_SOURCE", "dummy") + 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.