public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Felix Polyudov <felixp@ami.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] BaseTools: Fix incorrect formatting of GenFds command dictionary
Date: Wed, 16 Jan 2019 02:19:32 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B290D@SHSMSX152.ccr.corp.intel.com> (raw)
In-Reply-To: <20190115233241.53544-1-felixp@ami.com>

Please update the patch to remove EFI_SOURCE. This has been removed from edk2 master. 

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 <bob.c.feng@intel.com>; Gao, Liming
><liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
>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 <felixp@ami.com>
>---
> 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.<BR>
> # Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>
>+# Copyright (c) 2019, American Megatrends, Inc. All rights reserved.<BR>
> #
> # 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.


      reply	other threads:[~2019-01-16  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 23:32 [Patch] BaseTools: Fix incorrect formatting of GenFds command dictionary Felix Polyudov
2019-01-16  2:19 ` Gao, Liming [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E3B290D@SHSMSX152.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox