* Re: BaseTools issue finding PCDs in non-COMMON modules
[not found] <DF4PR84MB01378C0DC0FA75AD26C32B6891B90@DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM>
@ 2016-11-09 15:24 ` Huber, Brandon
2016-11-10 12:31 ` Zhu, Yonghong
0 siblings, 1 reply; 2+ messages in thread
From: Huber, Brandon @ 2016-11-09 15:24 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Hi All,
I'm seeing an issue with the latest BaseTools where it fails to find a PCD when parsing the FDF unless there is a COMMON version of module (e.g., built under [LibraryClasses.common] in the DSC) that includes the DEC in which the PCD is declared. In other words, when gathering PCDs, GenFds seems to disregard the architecture and always searches for COMMON modules.
For example, I have my PCD declared in MyPkg.dec:
[PcdsFixedAtBuild]
MyPcd|{0xF3, 0xB4, 0x47, 0x15, 0x8A, 0x3E, 0xEF, 0x4F, 0x81, 0xC8, 0x32, 0x8E, 0xD6, 0x47, 0xAB, 0x1A}|VOID*|0x40000004
Which is included in MyLib.inf:
[Packages]
Path/to/MyPkg.dec
And is added to the build in MyPkg.dsc:
[LibraryClasses.X64]
MyLib|path/to/MyLib.inf
Yet if MyLib.inf is not built under [LibraryClasses.common], it will not be retrieved in the package list.
>From edk2\BaseTools\Source\Python\Workspace\WorkspaceDatabase.py:
def GetPackageList(self, Platform, Arch, TargetName, ToolChainTag):
self.Platform = Platform
PackageList = []
Pa = self.BuildObject[self.Platform, 'COMMON']
#
# Get Package related to Modules
#
for Module in Pa.Modules:
ModuleObj = self.BuildObject[Module, Arch, TargetName, ToolChainTag]
for Package in ModuleObj.Packages:
if Package not in PackageList:
PackageList.append(Package)
#
# Get Packages related to Libraries
#
for Lib in Pa.LibraryInstances:
LibObj = self.BuildObject[Lib, Arch, TargetName, ToolChainTag]
for Package in LibObj.Packages:
if Package not in PackageList:
PackageList.append(Package)
return PackageList
If I change:
Pa = self.BuildObject[self.Platform, 'COMMON']
to use the Arch that was passed in:
Pa = self.BuildObject[self.Platform, Arch]
then I see all the proper packages (and thereby PCDs) get returned and I can complete the build. What I don't understand is why I just started experiencing this problem. This function hasn't changed since 2011 (ID: 0d2711a69397d2971079121df4326d84736c181e).
Two questions:
1. Any ideas on why this just started happening?
2. Are there any side effects to changing the architecture parameter as above?
Brandon Huber
Core BIOS Developer
brandon.huber@hp.com<mailto:brandon.huber@hp.com>
T +1 281 927 8958
HP Inc.
11445 Compaq Center Dr W
Houston, TX 77070
[HP]<http://www.hp.com/>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BaseTools issue finding PCDs in non-COMMON modules
2016-11-09 15:24 ` BaseTools issue finding PCDs in non-COMMON modules Huber, Brandon
@ 2016-11-10 12:31 ` Zhu, Yonghong
0 siblings, 0 replies; 2+ messages in thread
From: Zhu, Yonghong @ 2016-11-10 12:31 UTC (permalink / raw)
To: Huber, Brandon, edk2-devel@lists.01.org
Hi Brandon Huber,
Thanks for reporting this, I will investigate it and fix it.
Best Regards,
Zhu Yonghong
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Huber, Brandon
Sent: Wednesday, November 09, 2016 11:25 PM
To: edk2-devel@lists.01.org
Subject: Re: [edk2] BaseTools issue finding PCDs in non-COMMON modules
Hi All,
I'm seeing an issue with the latest BaseTools where it fails to find a PCD when parsing the FDF unless there is a COMMON version of module (e.g., built under [LibraryClasses.common] in the DSC) that includes the DEC in which the PCD is declared. In other words, when gathering PCDs, GenFds seems to disregard the architecture and always searches for COMMON modules.
For example, I have my PCD declared in MyPkg.dec:
[PcdsFixedAtBuild]
MyPcd|{0xF3, 0xB4, 0x47, 0x15, 0x8A, 0x3E, 0xEF, 0x4F, 0x81, 0xC8, 0x32, 0x8E, 0xD6, 0x47, 0xAB, 0x1A}|VOID*|0x40000004
Which is included in MyLib.inf:
[Packages]
Path/to/MyPkg.dec
And is added to the build in MyPkg.dsc:
[LibraryClasses.X64]
MyLib|path/to/MyLib.inf
Yet if MyLib.inf is not built under [LibraryClasses.common], it will not be retrieved in the package list.
>From edk2\BaseTools\Source\Python\Workspace\WorkspaceDatabase.py:
def GetPackageList(self, Platform, Arch, TargetName, ToolChainTag):
self.Platform = Platform
PackageList = []
Pa = self.BuildObject[self.Platform, 'COMMON']
#
# Get Package related to Modules
#
for Module in Pa.Modules:
ModuleObj = self.BuildObject[Module, Arch, TargetName, ToolChainTag]
for Package in ModuleObj.Packages:
if Package not in PackageList:
PackageList.append(Package)
#
# Get Packages related to Libraries
#
for Lib in Pa.LibraryInstances:
LibObj = self.BuildObject[Lib, Arch, TargetName, ToolChainTag]
for Package in LibObj.Packages:
if Package not in PackageList:
PackageList.append(Package)
return PackageList
If I change:
Pa = self.BuildObject[self.Platform, 'COMMON']
to use the Arch that was passed in:
Pa = self.BuildObject[self.Platform, Arch]
then I see all the proper packages (and thereby PCDs) get returned and I can complete the build. What I don't understand is why I just started experiencing this problem. This function hasn't changed since 2011 (ID: 0d2711a69397d2971079121df4326d84736c181e).
Two questions:
1. Any ideas on why this just started happening?
2. Are there any side effects to changing the architecture parameter as above?
Brandon Huber
Core BIOS Developer
brandon.huber@hp.com<mailto:brandon.huber@hp.com>
T +1 281 927 8958
HP Inc.
11445 Compaq Center Dr W
Houston, TX 77070
[HP]<http://www.hp.com/>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-10 12:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <DF4PR84MB01378C0DC0FA75AD26C32B6891B90@DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM>
2016-11-09 15:24 ` BaseTools issue finding PCDs in non-COMMON modules Huber, Brandon
2016-11-10 12:31 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox