public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch V2] BaseTools: Add build info for binary modules that only list in FDF file
Date: Fri, 29 Jul 2016 01:57:20 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E22BD@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1469669583-80280-1-git-send-email-yonghong.zhu@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Thursday, July 28, 2016 9:33 AM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [Patch V2] BaseTools: Add build info for binary modules that only list
> in FDF file
> 
> If the binary module is list in the FDF file but not list in the DSC
> file, current build report would not include these binary module's info
> in the report "Module section". The patch fix this issue.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  BaseTools/Source/Python/AutoGen/AutoGen.py   |  4 ++++
>  BaseTools/Source/Python/build/BuildReport.py | 18 +++++++++++++++++-
>  2 files changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index 9a95014..9c548be 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -1940,10 +1940,14 @@ class PlatformAutoGen(AutoGen):
>      #   @param  Module      The module from which the library classes will be
> resolved
>      #
>      #   @retval library_list    List of library instances sorted
>      #
>      def ApplyLibraryInstance(self, Module):
> +        # Cover the case that the binary INF file is list in the FDF file but not DSC
> file, return empty list directly
> +        if str(Module) not in self.Platform.Modules:
> +            return []
> +
>          ModuleType = Module.ModuleType
> 
>          # for overridding library instances with module specific setting
>          PlatformModule = self.Platform.Modules[str(Module)]
> 
> diff --git a/BaseTools/Source/Python/build/BuildReport.py
> b/BaseTools/Source/Python/build/BuildReport.py
> index ef99989..4c57754 100644
> --- a/BaseTools/Source/Python/build/BuildReport.py
> +++ b/BaseTools/Source/Python/build/BuildReport.py
> @@ -45,10 +45,13 @@ from Common.DataType import TAB_BRG_PCD
>  from Common.DataType import TAB_BRG_LIBRARY
>  from Common.DataType import TAB_BACK_SLASH
>  from Common.LongFilePathSupport import OpenLongFilePath as open
>  from Common.MultipleWorkspace import MultipleWorkspace as mws
>  import Common.GlobalData as GlobalData
> +from AutoGen.AutoGen import ModuleAutoGen
> +from Common.Misc import PathClass
> +from Common.String import NormPath
> 
>  ## Pattern to extract contents in EDK DXS files
>  gDxsDependencyPattern =
> re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL)
> 
>  ## Pattern to find total FV total size, occupied size in flash report
> intermediate file
> @@ -1645,12 +1648,25 @@ class PlatformReport(object):
>              for Ma in MaList:
>                  self.ModuleReportList.append(ModuleReport(Ma, ReportType))
>          else:
>              self._IsModuleBuild = False
>              for Pa in Wa.AutoGenObjectList:
> +                ModuleAutoGenList = []
>                  for ModuleKey in Pa.Platform.Modules:
> -
> self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[Module
> Key].M, ReportType))
> +
> ModuleAutoGenList.append(Pa.Platform.Modules[ModuleKey].M)
> +                if GlobalData.gFdfParser != None:
> +                    if Pa.Arch in GlobalData.gFdfParser.Profile.InfDict:
> +                        INFList = GlobalData.gFdfParser.Profile.InfDict[Pa.Arch]
> +                        for InfName in INFList:
> +                            InfClass = PathClass(NormPath(InfName), Wa.WorkspaceDir,
> Pa.Arch)
> +                            Ma = ModuleAutoGen(Wa, InfClass, Pa.BuildTarget,
> Pa.ToolChain, Pa.Arch, Wa.MetaFile)
> +                            if Ma == None:
> +                                continue
> +                            if Ma not in ModuleAutoGenList:
> +                                ModuleAutoGenList.append(Ma)
> +                for MGen in ModuleAutoGenList:
> +                    self.ModuleReportList.append(ModuleReport(MGen,
> ReportType))
> 
> 
> 
>      ##
>      # Generate report for the whole platform.
> --
> 2.6.1.windows.1



           reply	other threads:[~2016-07-29  1:57 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1469669583-80280-1-git-send-email-yonghong.zhu@intel.com>]

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=4A89E2EF3DFEDB4C8BFDE51014F606A1155E22BD@shsmsx102.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