From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, bob.c.feng@intel.com
Cc: Liming Gao <gaoliming@byosoft.com.cn>, Yuwei Chen <yuwei.chen@intel.com>
Subject: Re: [edk2-devel] [Patch] BaseTools: Sort the Pcd set when generating the VPD binary
Date: Mon, 7 Sep 2020 15:48:46 +0200 [thread overview]
Message-ID: <b60d7f0f-40ea-93dd-6d5f-2a48f23df7d0@redhat.com> (raw)
In-Reply-To: <20200904143028.41796-1-bob.c.feng@intel.com>
On 9/4/20 4:30 PM, Bob Feng wrote:
> 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 <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
> ---
> 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):
>
> VariableInfo = VariableMgr(self.DscBuildDataObj._GetDefaultStores(), self.DscBuildDataObj.SkuIds)
> VariableInfo.SetVpdRegionMaxSize(VpdRegionSize)
> VariableInfo.SetVpdRegionOffset(VpdRegionBase)
> Index = 0
> - for Pcd in DynamicPcdSet:
> + for Pcd in sorted(DynamicPcdSet):
> pcdname = ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName))
> for SkuName in Pcd.SkuInfoList:
> Sku = Pcd.SkuInfoList[SkuName]
> SkuId = Sku.SkuId
> if SkuId is None or SkuId == '':
> 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 = CApp + '#include <%s>\n' % (IncludeFile)
> CApp = CApp + '\n'
> for Pcd in StructuredPcds.values():
> CApp = CApp + self.GenerateArrayAssignment(Pcd)
> - for PcdName in StructuredPcds:
> + for PcdName in sorted(StructuredPcds.keys()):
> Pcd = StructuredPcds[PcdName]
> CApp = CApp + self.GenerateSizeFunction(Pcd)
> CApp = CApp + self.GenerateDefaultValueAssignFunction(Pcd)
> CApp = CApp + self.GenerateFdfValue(Pcd)
> CApp = CApp + self.GenerateCommandLineValue(Pcd)
>
next prev parent reply other threads:[~2020-09-07 13:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-04 14:30 [Patch] BaseTools: Sort the Pcd set when generating the VPD binary Bob Feng
2020-09-07 0:40 ` 回复: " gaoliming
2020-09-07 13:48 ` Philippe Mathieu-Daudé [this message]
2020-09-08 9:29 ` [edk2-devel] " Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b60d7f0f-40ea-93dd-6d5f-2a48f23df7d0@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox