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.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 1C08022135D3B for ; Wed, 7 Mar 2018 17:46:21 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2018 17:52:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,438,1515484800"; d="scan'208";a="206402421" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 07 Mar 2018 17:52:36 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 7 Mar 2018 17:52:36 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 7 Mar 2018 17:52:36 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.130]) with mapi id 14.03.0319.002; Thu, 8 Mar 2018 09:52:35 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fix a bug for --pcd used in ConditionalStatement calculate Thread-Index: AQHTte8qAyW5VBxGdkKzmnkIpBnmGKPFlF2A Date: Thu, 8 Mar 2018 01:52:34 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1D90A2@SHSMSX104.ccr.corp.intel.com> References: <1520411648-5908-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1520411648-5908-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 a bug for --pcd used in ConditionalStatement calculate 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: Thu, 08 Mar 2018 01:46:22 -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: Wednesday, March 7, 2018 4:34 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [Patch] BaseTools: Fix a bug for --pcd used in Conditiona= lStatement calculate >=20 > Move the GlobalData.BuildOptionPcd before FdfParser() function >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Yonghong Zhu > --- > BaseTools/Source/Python/GenFds/GenFds.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/= Python/GenFds/GenFds.py > index 4c56cbb..e3cc77f 100644 > --- a/BaseTools/Source/Python/GenFds/GenFds.py > +++ b/BaseTools/Source/Python/GenFds/GenFds.py > @@ -268,10 +268,12 @@ def main(): >=20 > if not os.path.exists(OutputDir): > EdkLogger.error("GenFds", FILE_NOT_FOUND, ExtraData=3DOu= tputDir) > GenFdsGlobalVariable.OutputDirDict[Key] =3D OutputDir >=20 > + GlobalData.BuildOptionPcd =3D Options.OptionPcd if Options.O= ptionPcd else {} > + > """ Parse Fdf file, has to place after build Workspace as FDF ma= y contain macros from DSC file """ > FdfParserObj =3D FdfParser.FdfParser(FdfFilename) > FdfParserObj.ParseFile() >=20 > if FdfParserObj.CycleReferenceCheck(): > @@ -324,11 +326,10 @@ def main(): > EdkLogger.error("GenFds", FORMAT= _INVALID, "The FV %s's region is specified in > multiple FD with different value." %FvObj.UiFvName) > else: > FvObj.FvRegionInFD =3D RegionObj.Siz= e > RegionObj.BlockInfoOfRegion(FdObj.Bl= ockSizeList, FvObj) >=20 > - GlobalData.BuildOptionPcd =3D Options.OptionPcd if Options.O= ptionPcd else {} > """Call GenFds""" > GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList) >=20 > """Generate GUID cross reference file""" > GenFds.GenerateGuidXRefFile(BuildWorkSpace, ArchList, FdfParserO= bj) > -- > 2.6.1.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel