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.126; helo=mga18.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org 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 D3D1A210C2D7A for ; Thu, 26 Jul 2018 23:07:58 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 23:07:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,407,1526367600"; d="scan'208";a="67925629" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jul 2018 23:07:57 -0700 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 26 Jul 2018 23:07:57 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 26 Jul 2018 23:07:57 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.100]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.81]) with mapi id 14.03.0319.002; Fri, 27 Jul 2018 14:07:55 +0800 From: "Zhu, Yonghong" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [edk2] [PATCH] BaseTools: Update build report for StructurePcd value Thread-Index: AQHUJOGdkwDvUn3ekEmCov/6SuWBV6SilocQ Date: Fri, 27 Jul 2018 06:07:54 +0000 Message-ID: References: <1532610423-2364-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1532610423-2364-1-git-send-email-yonghong.zhu@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: 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: , X-List-Received-Date: Fri, 27 Jul 2018 06:07:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yong= hong Zhu Sent: Thursday, July 26, 2018 9:07 PM To: edk2-devel@lists.01.org Cc: Gao, Liming Subject: [edk2] [PATCH] BaseTools: Update build report for StructurePcd val= ue 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 --- 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: -- 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel