From nobody Fri Apr 19 15:21:19 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532610432498898.8084948567041; Thu, 26 Jul 2018 06:07:12 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0A108210C282C; Thu, 26 Jul 2018 06:07:12 -0700 (PDT) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 933AE210BFF5D for ; Thu, 26 Jul 2018 06:07:08 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 06:07:08 -0700 Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga001.jf.intel.com with ESMTP; 26 Jul 2018 06:07:06 -0700 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=192.55.52.88; helo=mga01.intel.com; envelope-from=yonghong.zhu@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.51,405,1526367600"; d="scan'208";a="76137217" From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Thu, 26 Jul 2018 21:07:03 +0800 Message-Id: <1532610423-2364-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [edk2] [PATCH] BaseTools: Update build report for StructurePcd value X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 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" From: Yunhua Feng Update build report to display the structure Pcd value that from FDF file. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu =20 --- BaseTools/Source/Python/build/BuildReport.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Sourc= e/Python/build/BuildReport.py index 27680019dc..d973db5c77 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -966,11 +966,10 @@ class PcdReport(object): Field =3D '' for (CName, Guid, Field) in self.FdfPcdSet: if CName =3D=3D PcdTokenCName and Guid =3D=3D Key: DscDefaultValue =3D self.FdfPcdSet[(CName, Guid, F= ield)] break - DscDefaultValue =3D self.FdfPcdSet.get((Pcd.TokenCName, Ke= y), DscDefaultValue) if DscDefaultValue !=3D DscDefaultValBak: try: DscDefaultValue =3D ValueExpressionEx(DscDefaultVa= lue, Pcd.DatumType, self._GuidDict)(True) except BadExpression as DscDefaultValue: EdkLogger.error('BuildReport', FORMAT_INVALID, "PC= D Value: %s, Type: %s" %(DscDefaultValue, Pcd.DatumType)) @@ -1082,12 +1081,17 @@ class PcdReport(object): OverrideFieldStruct =3D self.Overr= ideFieldValue(Pcd, OverrideValues[Keys[0]]) DscOverride =3D self.ParseStruct(O= verrideFieldStruct) if DscOverride: break if DscOverride: + DscDefaultValue =3D True DscMatch =3D True DecMatch =3D False + else: + DscDefaultValue =3D True + DscMatch =3D True + DecMatch =3D False =20 # # Report PCD item according to their override relationship # if DecMatch: @@ -1344,20 +1348,26 @@ class PcdReport(object): for Key, Values in OverrideStruct.items(): if Values[1] and Values[1].endswith('.dsc'): OverrideFieldStruct[Key] =3D Values if Pcd.PcdFieldValueFromFdf: for Key, Values in Pcd.PcdFieldValueFromFdf.items(): + if Key in OverrideFieldStruct and Values[0] =3D=3D Overrid= eFieldStruct[Key][0]: + continue OverrideFieldStruct[Key] =3D Values if Pcd.PcdFieldValueFromComm: for Key, Values in Pcd.PcdFieldValueFromComm.items(): + if Key in OverrideFieldStruct and Values[0] =3D=3D Overrid= eFieldStruct[Key][0]: + continue OverrideFieldStruct[Key] =3D Values return OverrideFieldStruct =20 def PrintStructureInfo(self, File, Struct): - for Key, Value in Struct.items(): + for Key, Value in sorted(Struct.items(), key=3Dlambda x: x[0]): if Value[1] and 'build command options' in Value[1]: FileWrite(File, ' *B %-*s =3D %s' % (self.MaxLen + 4, = '.' + Key, Value[0])) + elif Value[1] and Value[1].endswith('.fdf'): + FileWrite(File, ' *F %-*s =3D %s' % (self.MaxLen + 4, = '.' + Key, Value[0])) else: FileWrite(File, ' %-*s =3D %s' % (self.MaxLen + 4, = '.' + Key, Value[0])) =20 def StrtoHex(self, value): try: --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel