public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [Patch V2] BaseTools: Add build info for binary modules that only list in FDF file
       [not found] <1469669583-80280-1-git-send-email-yonghong.zhu@intel.com>
@ 2016-07-29  1:57 ` Gao, Liming
  0 siblings, 0 replies; only message in thread
From: Gao, Liming @ 2016-07-29  1:57 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-29  1:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1469669583-80280-1-git-send-email-yonghong.zhu@intel.com>
2016-07-29  1:57 ` [Patch V2] BaseTools: Add build info for binary modules that only list in FDF file Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox