From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 9CB5F21E082BE for ; Fri, 2 Mar 2018 20:28:20 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2018 20:34:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,415,1515484800"; d="scan'208";a="208475085" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 02 Mar 2018 20:34:30 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 2 Mar 2018 20:34:29 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.116]) with mapi id 14.03.0319.002; Sat, 3 Mar 2018 12:34:28 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix the bug to search Fv.txt file relative to workspace Thread-Index: AQHTsklx/yi/XtgXz0mxkZFPikmlZqO97T2w Date: Sat, 3 Mar 2018 04:34:27 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1D6B18@SHSMSX104.ccr.corp.intel.com> References: <1520010543-14416-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1520010543-14416-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Fix the bug to search Fv.txt file relative to workspace X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Mar 2018 04:28:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yo= nghong Zhu > Sent: Saturday, March 3, 2018 1:09 AM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: Fix the bug to search Fv.txt file rela= tive to workspace >=20 > when the SECTION FV_IMAGE =3D $(XX)/XX.Fv, the Fv file should relative to > WORKSPACE, so when we search the XX.Fv.txt file, we should search the > path relative to workspace first. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/build/BuildReport.py | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sou= rce/Python/build/BuildReport.py > index b2cc6ee..2fb6ad0 100644 > --- a/BaseTools/Source/Python/build/BuildReport.py > +++ b/BaseTools/Source/Python/build/BuildReport.py > @@ -1621,10 +1621,11 @@ class FdRegionReport(object): > self.Size =3D FdRegion.Size > self.FvList =3D [] > self.FvInfo =3D {} > self._GuidsDb =3D {} > self._FvDir =3D Wa.FvDir > + self._WorkspaceDir =3D Wa.WorkspaceDir >=20 > # > # If the input FdRegion is not a firmware volume, > # we are done. > # > @@ -1724,17 +1725,19 @@ class FdRegionReport(object): >=20 > if self.Type =3D=3D "FV": > FvTotalSize =3D 0 > FvTakenSize =3D 0 > FvFreeSize =3D 0 > - if not os.path.isfile(FvName): > - FvReportFileName =3D os.path.join(self._FvDir, FvName + = ".Fv.txt") > + if FvName.upper().endswith('.FV'): > + FileExt =3D FvName + ".txt" > else: > - if FvName.upper().endswith('.FV'): > - FvReportFileName =3D FvName + ".txt" > - else: > - FvReportFileName =3D FvName + ".Fv.txt" > + FileExt =3D FvName + ".Fv.txt" > + > + if not os.path.isfile(FileExt): > + FvReportFileName =3D mws.join(self._WorkspaceDir, FileEx= t) > + if not os.path.isfile(FvReportFileName): > + FvReportFileName =3D os.path.join(self._FvDir, FileE= xt) > try: > # > # Collect size info in the firmware volume. > # > FvReport =3D open(FvReportFileName).read() > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel