From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by ml01.01.org (Postfix) with ESMTP id 251A81A1E00 for ; Thu, 28 Jul 2016 18:57:35 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 28 Jul 2016 18:57:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,436,1464678000"; d="scan'208";a="1015919947" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 28 Jul 2016 18:57:24 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 28 Jul 2016 18:57:23 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.147]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002; Fri, 29 Jul 2016 09:57:21 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [Patch V2] BaseTools: Add build info for binary modules that only list in FDF file Thread-Index: AQHR6HAIosYnz/sfJEigEIVxxKCW6KAuqCvg Date: Fri, 29 Jul 2016 01:57:20 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E22BD@shsmsx102.ccr.corp.intel.com> References: <1469669583-80280-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1469669583-80280-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch V2] BaseTools: Add build info for binary modules that only list in FDF file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2016 01:57:35 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Zhu, Yonghong > Sent: Thursday, July 28, 2016 9:33 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [Patch V2] BaseTools: Add build info for binary modules that onl= y list > in FDF file >=20 > 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. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/AutoGen/AutoGen.py | 4 ++++ > BaseTools/Source/Python/build/BuildReport.py | 18 +++++++++++++++++- > 2 files changed, 21 insertions(+), 1 deletion(-) >=20 > 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 wi= ll 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 fil= e but not DSC > file, return empty list directly > + if str(Module) not in self.Platform.Modules: > + return [] > + > ModuleType =3D Module.ModuleType >=20 > # for overridding library instances with module specific setting > PlatformModule =3D self.Platform.Modules[str(Module)] >=20 > 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 >=20 > ## Pattern to extract contents in EDK DXS files > gDxsDependencyPattern =3D > re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL) >=20 > ## 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 =3D False > for Pa in Wa.AutoGenObjectList: > + ModuleAutoGenList =3D [] > 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 !=3D None: > + if Pa.Arch in GlobalData.gFdfParser.Profile.InfDict: > + INFList =3D GlobalData.gFdfParser.Profile.InfDic= t[Pa.Arch] > + for InfName in INFList: > + InfClass =3D PathClass(NormPath(InfName), Wa= .WorkspaceDir, > Pa.Arch) > + Ma =3D ModuleAutoGen(Wa, InfClass, Pa.BuildT= arget, > Pa.ToolChain, Pa.Arch, Wa.MetaFile) > + if Ma =3D=3D None: > + continue > + if Ma not in ModuleAutoGenList: > + ModuleAutoGenList.append(Ma) > + for MGen in ModuleAutoGenList: > + self.ModuleReportList.append(ModuleReport(MGen, > ReportType)) >=20 >=20 >=20 > ## > # Generate report for the whole platform. > -- > 2.6.1.windows.1