From nobody Mon Nov 25 19:47:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+65056+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65056+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1599229856; cv=none; d=zohomail.com; s=zohoarc; b=i5YVZ9lUaDTeyFt7xSU4Uk60BCbeEyVE1hrqB6n2votKXjj9hRoapZiWarqgSU9htrC8WQR12mwjZ0RLvVMlHjDMq0wXJ7bo6Ir8apThF1Bu/Dm+/EfIE7Jfqk1CuceeBzO/UyIhtrY9uyfll7jRLHkeBL/HHyjt/QS0W0NiH1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599229856; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=4pAGcb53vyKXBBPmyToM4ON9mLuc2K0vrUC0bxfNgj8=; b=W30Al1nU4iAI0qJYF/Wt8PaePHzfGMLOYbAdBOHy8828K56+V0YjkxXS74S1byPlg/i2gc+/71SwLy2zkV3qGdqEXmnmWk0vZmmx0BMyrVehANusfLktNgw6rqtlt4ypElZ9MNtMKYAoGp1/1eFGRoMRgxIOd2B5pKSWZOkZlc8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+65056+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1599229856146261.5163223020106; Fri, 4 Sep 2020 07:30:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id bxhQYY1788612xEbEaGhspip; Fri, 04 Sep 2020 07:30:55 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.39313.1599229854505428947 for ; Fri, 04 Sep 2020 07:30:55 -0700 IronPort-SDR: i4aEnejd/yYAQq6OMXRMOngHeUI9rihRwYjoGbII5Guwc8tywNnizlMoyNW+JUWafRVvUy9Nc3 z3ghGRx070Jw== X-IronPort-AV: E=McAfee;i="6000,8403,9734"; a="137268051" X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="137268051" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Sep 2020 07:30:54 -0700 IronPort-SDR: FIbAgwG+ahZPsbpbomIAyyZj0Nxk28JOf1lNeMCfzJJvFJYfrFcARiFYndVbxW09yWAC5LX1C8 1+r4WD9oKUOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,389,1592895600"; d="scan'208";a="502947157" X-Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.66]) by fmsmga006.fm.intel.com with ESMTP; 04 Sep 2020 07:30:52 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Yuwei Chen Subject: [edk2-devel] [Patch] BaseTools: Sort the Pcd set when generating the VPD binary Date: Fri, 4 Sep 2020 22:30:28 +0800 Message-Id: <20200904143028.41796-1-bob.c.feng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,bob.c.feng@intel.com X-Gm-Message-State: EmlbZ8Al67FSc64vETYEFIDVx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1599229855; bh=bwIuy9Oxz3krh2QJIuQ+0xHNAadYObP2Xi/EM+q/M7A=; h=Cc:Date:From:Reply-To:Subject:To; b=QeftzWBmMy1N16TWhf2PqFBzJKoV955uJlTMEc1ndrO4vVD1cW7bohKTyZ3iTfASkLA B23xkaO+EFj6ft6W76izZ3i4ZmEXVKyN1PsuybS+2WwvjGfB6cCbRYcn186E+Nz9NvmXN NpMb1vxIK/y+VP+EreCX3t6eAcKipE3W2gU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" If VPD PcdNvStoreDefaultValueBuffer is used, all DynamicHii and DynamicExHii PCD value will be generated into that VPD. In order to generate the same VPD binary file in every build, sort the Pcd set when generating VPD. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Reviewed-by: Liming Gao Reviewed-by: Philippe Mathieu-Daude --- BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 +- BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools= /Source/Python/AutoGen/PlatformAutoGen.py index af66c48c7d..26ab8e7f36 100644 --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py @@ -251,11 +251,11 @@ class PlatformAutoGen(AutoGen): =20 VariableInfo =3D VariableMgr(self.DscBuildDataObj._GetDefaultStore= s(), self.DscBuildDataObj.SkuIds) VariableInfo.SetVpdRegionMaxSize(VpdRegionSize) VariableInfo.SetVpdRegionOffset(VpdRegionBase) Index =3D 0 - for Pcd in DynamicPcdSet: + for Pcd in sorted(DynamicPcdSet): pcdname =3D ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName)) for SkuName in Pcd.SkuInfoList: Sku =3D Pcd.SkuInfoList[SkuName] SkuId =3D Sku.SkuId if SkuId is None or SkuId =3D=3D '': diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 1afbd3eefc..4a128c8a77 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -2582,11 +2582,11 @@ class DscBuildData(PlatformBuildClassObject): IncludeFiles.add(IncludeFile) CApp =3D CApp + '#include <%s>\n' % (IncludeFile) CApp =3D CApp + '\n' for Pcd in StructuredPcds.values(): CApp =3D CApp + self.GenerateArrayAssignment(Pcd) - for PcdName in StructuredPcds: + for PcdName in sorted(StructuredPcds.keys()): Pcd =3D StructuredPcds[PcdName] CApp =3D CApp + self.GenerateSizeFunction(Pcd) CApp =3D CApp + self.GenerateDefaultValueAssignFunction(Pcd) CApp =3D CApp + self.GenerateFdfValue(Pcd) CApp =3D CApp + self.GenerateCommandLineValue(Pcd) --=20 2.20.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65056): https://edk2.groups.io/g/devel/message/65056 Mute This Topic: https://groups.io/mt/76630786/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-