From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 B731721D492CA for ; Wed, 13 Sep 2017 20:53:32 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 13 Sep 2017 20:56:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,390,1500966000"; d="scan'208,217";a="311484312" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 13 Sep 2017 20:56:30 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 13 Sep 2017 20:56:30 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 13 Sep 2017 20:56:30 -0700 Received: from shsmsx151.ccr.corp.intel.com ([169.254.3.98]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.168]) with mapi id 14.03.0319.002; Thu, 14 Sep 2017 11:56:28 +0800 From: "Yao, Jiewen" To: "Yao, Jiewen" , "Chiu, Chasel" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't include specific UPD name Thread-Index: AQHTLQNPCwSzGz5S9UmkjolMV5KHtaKzrORAgAATR1A= Date: Thu, 14 Sep 2017 03:56:28 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A9B21F1@SHSMSX151.ccr.corp.intel.com> References: <20170914024330.8032-1-chasel.chiu@intel.com> <74D8A39837DF1E4DA445A8C0B3885C503A9B2141@SHSMSX151.ccr.corp.intel.com> In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503A9B2141@SHSMSX151.ccr.corp.intel.com> Accept-Language: zh-CN, 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 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: [PATCH] IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't include specific UPD name X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2017 03:53:32 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I just got an idea on release mode checking. Because the build.exe will parse target.txt to decide if current build is D= EBUG or RELEASE, I think we can enhance the GenCftOpt.py to get same infor= mation from target.txt. In such way, all tools get same result on debug/release. Thank you Yao Jiewen From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yao,= Jiewen Sent: Thursday, September 14, 2017 10:47 AM To: Chiu, Chasel ; edk2-devel@lists.01.org Subject: Re: [edk2] [PATCH] IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't incl= ude specific UPD name Thanks to catch this. Reviewed-by: Jiewen.yao@Intel.com > -----Original Message----- > From: Chiu, Chasel > Sent: Thursday, September 14, 2017 10:44 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen >; Chiu= , Chasel > > Subject: [PATCH] IntelFsp2Pkg-Tools: GenCfgOpt.py shouldn't include speci= fic > UPD name > > PcdSerialIoUartDebugEnable UPD is platform specific and should not > be included in generic GenCfgOpt.py script. Remove this and platform > DSC should control the default value instead. > > Cc: Jiewen Yao > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Chasel Chiu > > --- > IntelFsp2Pkg/Tools/GenCfgOpt.py | 12 ------------ > 1 file changed, 12 deletions(-) > > diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py > b/IntelFsp2Pkg/Tools/GenCfgOpt.py > index 6dc1b10b34..c9b7bc5373 100644 > --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py > +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py > @@ -289,7 +289,6 @@ class CGenCfgOpt: > def __init__(self): > self.Debug =3D False > self.Error =3D '' > - self.ReleaseMode =3D True > > self._GlobalDataDef =3D """ > GlobalDataDef > @@ -318,13 +317,6 @@ EndList > self._FvDir =3D '' > self._MapVer =3D 0 > > - def ParseBuildMode (self, OutputStr): > - if "RELEASE_" in OutputStr: > - self.ReleaseMode =3D True > - if "DEBUG_" in OutputStr: > - self.ReleaseMode =3D False > - return > - > def ParseMacros (self, MacroDefStr): > # ['-DABC=3D1', '-D', 'CFG_DEBUG=3D1', '-D', 'CFG_OUTDIR=3DBuild= '] > self._MacroDict =3D {} > @@ -815,9 +807,6 @@ EndList > > TxtFd.write("%s.UnusedUpdSpace%d|%s0x%04X|0x%04X|{0}\n" % > (Item['space'], SpaceIdx, Default, NextOffset - StartAddr, Offset - NextO= ffset)) > SpaceIdx =3D SpaceIdx + 1 > NextOffset =3D Offset + Item['length'] > - if Item['cname'] =3D=3D 'PcdSerialIoUartDebugEnable': > - if self.ReleaseMode =3D=3D False: > - Item['value'] =3D 0x01 > TxtFd.write("%s.%s|%s0x%04X|%s|%s\n" % > (Item['space'],Item['cname'],Default,Item['offset'] - > StartAddr,Item['length'],Item['value'])) > TxtFd.close() > return 0 > @@ -1437,7 +1426,6 @@ def Main(): > print "ERROR: Macro parsing failed !" > return 3 > > - GenCfgOpt.ParseBuildMode(sys.argv[3]) > FvDir =3D sys.argv[3] > if not os.path.exists(FvDir): > os.makedirs(FvDir) > -- > 2.13.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel