From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 5163A22361E49 for ; Wed, 7 Feb 2018 19:01:52 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Feb 2018 19:07:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,476,1511856000"; d="scan'208";a="25630544" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 07 Feb 2018 19:07:36 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 7 Feb 2018 19:07:35 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 7 Feb 2018 19:07:35 -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 Feb 2018 11:07:33 +0800 From: "Gao, Liming" To: "Feng, Bob C" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch] BaseTools: Fixed Build failed issue. Thread-Index: AQHTnxsKL7cbhiGd6UKk3H124z1zsqOZ1bKg Date: Thu, 8 Feb 2018 03:07:33 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C994E@SHSMSX104.ccr.corp.intel.com> References: <20180206072046.12032-1-bob.c.feng@intel.com> In-Reply-To: <20180206072046.12032-1-bob.c.feng@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: Fixed Build failed issue. 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 Feb 2018 03:01:52 -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 >BobCF >Sent: Tuesday, February 06, 2018 3:21 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [edk2] [Patch] BaseTools: Fixed Build failed issue. > >If the PCD is not used in DSC file and user set >that PCD value from Command line, build will fail. > >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Bob Feng >Cc: Liming Gao >--- > BaseTools/Source/Python/Workspace/DscBuildData.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py >b/BaseTools/Source/Python/Workspace/DscBuildData.py >index 1da4f03ab8..6e3cd0f3f1 100644 >--- a/BaseTools/Source/Python/Workspace/DscBuildData.py >+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py >@@ -896,11 +896,12 @@ class DscBuildData(PlatformBuildClassObject): > else: > pcdobj =3D self._Pcds.get((pcd[1],pcd[0])) > if pcdobj: > pcdset.append((pcd[0],pcd[1], pcdobj.DefaultValue= )) > else: >- pcdset.append((pcd[0],pcd[1],pcd[3])) >+ pcdvalue =3D pcd[3] if len(pcd) =3D=3D 4 else pcd= [2] >+ pcdset.append((pcd[0],pcd[1],pcdvalue)) > GlobalData.BuildOptionPcd =3D pcdset > def GetFieldValueFromComm(self,ValueStr,TokenSpaceGuidCName, >TokenCName, FieldName): > PredictedFieldType =3D "VOID*" > if ValueStr.startswith('L'): > if not ValueStr[1]: >@@ -2163,14 +2164,18 @@ class DscBuildData(PlatformBuildClassObject): > > > for pcd in Pcds.values(): > SkuInfoObj =3D pcd.SkuInfoList.values()[0] > pcdDecObject =3D self._DecPcds[pcd.TokenCName, >pcd.TokenSpaceGuidCName] >+ pcd.DatumType =3D pcdDecObject.DatumType > # Only fix the value while no value provided in DSC file. > for sku in pcd.SkuInfoList.values(): > if (sku.HiiDefaultValue =3D=3D "" or sku.HiiDefaultValue = =3D=3D None): > sku.HiiDefaultValue =3D pcdDecObject.DefaultValue >+ for default_store in sku.DefaultStoreDict: >+ >sku.DefaultStoreDict[default_store]=3DpcdDecObject.DefaultValue >+ pcd.DefaultValue =3D pcdDecObject.DefaultValue > if 'DEFAULT' not in pcd.SkuInfoList.keys() and 'COMMON' not i= n >pcd.SkuInfoList.keys(): > valuefromDec =3D pcdDecObject.DefaultValue > SkuInfo =3D SkuInfoClass('DEFAULT', '0', SkuInfoObj.Varia= bleName, >SkuInfoObj.VariableGuid, SkuInfoObj.VariableOffset, >valuefromDec,VariableAttribute=3DSkuInfoObj.VariableAttribute,DefaultStore= =3D >{DefaultStore:valuefromDec}) > pcd.SkuInfoList['DEFAULT'] =3D SkuInfo > elif 'DEFAULT' not in pcd.SkuInfoList.keys() and 'COMMON' in >pcd.SkuInfoList.keys(): >-- >2.14.3.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel