From nobody Mon Dec 23 11:14:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1517901653735343.3198019234635; Mon, 5 Feb 2018 23:20:53 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DA3AC21E0BA10; Mon, 5 Feb 2018 23:15:09 -0800 (PST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 35E752034A8A6 for ; Mon, 5 Feb 2018 23:15:08 -0800 (PST) Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2018 23:20:50 -0800 Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by orsmga008.jf.intel.com with ESMTP; 05 Feb 2018 23:20:49 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,467,1511856000"; d="scan'208";a="15773723" From: BobCF To: edk2-devel@lists.01.org Date: Tue, 6 Feb 2018 15:20:46 +0800 Message-Id: <20180206072046.12032-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [edk2] [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: , Cc: Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: 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, TokenCNam= e, FieldName): PredictedFieldType =3D "VOID*" if ValueStr.startswith('L'): if not ValueStr[1]: @@ -2163,14 +2164,18 @@ class DscBuildData(PlatformBuildClassObject): =20 =20 for pcd in Pcds.values(): SkuInfoObj =3D pcd.SkuInfoList.values()[0] pcdDecObject =3D self._DecPcds[pcd.TokenCName, pcd.TokenSpaceG= uidCName] + 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 in= pcd.SkuInfoList.keys(): valuefromDec =3D pcdDecObject.DefaultValue SkuInfo =3D SkuInfoClass('DEFAULT', '0', SkuInfoObj.Variab= leName, SkuInfoObj.VariableGuid, SkuInfoObj.VariableOffset, valuefromDec,Va= riableAttribute=3DSkuInfoObj.VariableAttribute,DefaultStore=3D{DefaultStore= :valuefromDec}) pcd.SkuInfoList['DEFAULT'] =3D SkuInfo elif 'DEFAULT' not in pcd.SkuInfoList.keys() and 'COMMON' in p= cd.SkuInfoList.keys(): --=20 2.14.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel