From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 73E331A203B for ; Thu, 22 Sep 2016 18:36:37 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 22 Sep 2016 18:36:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,380,1470726000"; d="scan'208";a="1060771920" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 22 Sep 2016 18:36:37 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 22 Sep 2016 18:36:36 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.15]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.234]) with mapi id 14.03.0248.002; Fri, 23 Sep 2016 09:36:35 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: handling the case that map file is not exist Thread-Index: AQHSFNkz11HdLquhRESjwmZ4efy5baCGTCFw Date: Fri, 23 Sep 2016 01:36:34 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B47BEB0@shsmsx102.ccr.corp.intel.com> References: <1474552607-6312-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1474552607-6312-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] BaseTools: handling the case that map file is not exist 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, 23 Sep 2016 01:36:37 -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 > Yonghong Zhu > Sent: Thursday, September 22, 2016 9:57 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [Patch] BaseTools: handling the case that map file is not= exist >=20 > We meet a case that add the library inf file which has the uni file in > the [Sources] section, for this case there will no map file exist, it > cause build tools report Traceback error. >=20 > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/GenFds/FfsInfStatement.py | 33 > ++++++++++++----------- > 1 file changed, 17 insertions(+), 16 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py > b/BaseTools/Source/Python/GenFds/FfsInfStatement.py > index b0b22d1..e9517a4 100644 > --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py > +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py > @@ -939,26 +939,27 @@ class FfsInfStatement(FfsInfStatementClassObject): > if len(VfrUniBaseName) > 0: > VfrUniOffsetList =3D > self.__GetBuildOutputMapFileVfrUniInfo(VfrUniBaseName) > # > # Generate the Raw data of raw section > # > - os.path.join( self.OutputPath, self.BaseName + '.off= set') > - UniVfrOffsetFileName =3D os.path.join( self.Outp= utPath, > self.BaseName + '.offset') > - UniVfrOffsetFileSection =3D os.path.join( self.Outp= utPath, > self.BaseName + 'Offset' + '.raw') > - > - self.__GenUniVfrOffsetFile (VfrUniOffsetList, > UniVfrOffsetFileName) > - > - UniVfrOffsetFileNameList =3D [] > - UniVfrOffsetFileNameList.append(UniVfrOffsetFileName= ) > - """Call GenSection""" > - GenFdsGlobalVariable.GenerateSection(UniVfrOffsetFil= eSection, > - UniVfrOffsetFil= eNameList, > - "EFI_SECTION_RA= W" > - ) > - os.remove(UniVfrOffsetFileName) > - SectList.append(UniVfrOffsetFileSection) > - HasGneratedFlag =3D True > + if VfrUniOffsetList: > + os.path.join( self.OutputPath, self.BaseName + '= .offset') > + UniVfrOffsetFileName =3D os.path.join( self.= OutputPath, > self.BaseName + '.offset') > + UniVfrOffsetFileSection =3D os.path.join( self.= OutputPath, > self.BaseName + 'Offset' + '.raw') > + > + self.__GenUniVfrOffsetFile (VfrUniOffsetList, > UniVfrOffsetFileName) > + > + UniVfrOffsetFileNameList =3D [] > + UniVfrOffsetFileNameList.append(UniVfrOffsetFile= Name) > + """Call GenSection""" > + > GenFdsGlobalVariable.GenerateSection(UniVfrOffsetFileSection, > + UniVfrOffse= tFileNameList, > + "EFI_SECTIO= N_RAW" > + ) > + os.remove(UniVfrOffsetFileName) > + SectList.append(UniVfrOffsetFileSection) > + HasGneratedFlag =3D True >=20 > for SecName in SectList : > SectFiles.append(SecName) > SectAlignments.append(Align) > Index =3D Index + 1 > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel