From: "Gao, Liming" <liming.gao@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] BaseTools: Fix the bug when use FILE_GUID override the module in DSC
Date: Mon, 8 Aug 2016 02:38:26 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E60DE@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1470217537-63644-1-git-send-email-yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Wednesday, August 03, 2016 5:46 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [Patch] BaseTools: Fix the bug when use FILE_GUID override the
> module in DSC
>
> In last commit 2502b73, it doesn't cover the case that in the DSC file
> use FILE_GUID to override the module.
>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index 9c548be..0484a5d 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -328,32 +328,41 @@ class WorkspaceAutoGen(AutoGen):
> for fvname in self.FvTargetList:
> if fvname.upper() not in self.FdfProfile.FvDict:
> EdkLogger.error("build", OPTION_VALUE_INVALID,
> "No such an FV in FDF file: %s" % fvname)
>
> + # In DSC file may use FILE_GUID to override the module, then in the
> Platform.Modules use FILE_GUIDmodule.inf as key,
> + # but the path (self.MetaFile.Path) is the real path
> for key in self.FdfProfile.InfDict:
> if key == 'ArchTBD':
> Platform_cache = {}
> + MetaFile_cache = {}
> for Arch in self.ArchList:
> Platform_cache[Arch] = self.BuildDatabase[self.MetaFile, Arch,
> Target, Toolchain]
> + MetaFile_cache[Arch] = []
> + for Pkey in Platform_cache[Arch].Modules.keys():
> +
> MetaFile_cache[Arch].append(Platform_cache[Arch].Modules[Pkey].MetaFi
> le)
> for Inf in self.FdfProfile.InfDict[key]:
> ModuleFile = PathClass(NormPath(Inf), GlobalData.gWorkspace,
> Arch)
> for Arch in self.ArchList:
> - if ModuleFile in Platform_cache[Arch].Modules:
> + if ModuleFile in MetaFile_cache[Arch]:
> break
> else:
> ModuleData = self.BuildDatabase[ModuleFile, Arch, Target,
> Toolchain]
> if not ModuleData.IsBinaryModule:
> EdkLogger.error('build', PARSER_ERROR, "Module %s NOT
> found in DSC file; Is it really a binary module?" % ModuleFile)
>
> else:
> for Arch in self.ArchList:
> if Arch == key:
> Platform = self.BuildDatabase[self.MetaFile, Arch, Target,
> Toolchain]
> + MetaFileList = []
> + for Pkey in Platform.Modules.keys():
> + MetaFileList.append(Platform.Modules[Pkey].MetaFile)
> for Inf in self.FdfProfile.InfDict[key]:
> ModuleFile = PathClass(NormPath(Inf),
> GlobalData.gWorkspace, Arch)
> - if ModuleFile in Platform.Modules:
> + if ModuleFile in MetaFileList:
> continue
> ModuleData = self.BuildDatabase[ModuleFile, Arch, Target,
> Toolchain]
> if not ModuleData.IsBinaryModule:
> EdkLogger.error('build', PARSER_ERROR, "Module %s NOT
> found in DSC file; Is it really a binary module?" % ModuleFile)
>
> --
> 2.6.1.windows.1
prev parent reply other threads:[~2016-08-08 2:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 9:45 [Patch] BaseTools: Fix the bug when use FILE_GUID override the module in DSC Yonghong Zhu
2016-08-08 2:38 ` Gao, Liming [this message]
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=4A89E2EF3DFEDB4C8BFDE51014F606A1155E60DE@shsmsx102.ccr.corp.intel.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