public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhu, Yonghong" <yonghong.zhu@intel.com>
To: "Huber, Brandon" <brandon.huber@hp.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: BaseTools issue finding PCDs in non-COMMON modules
Date: Thu, 10 Nov 2016 12:31:44 +0000	[thread overview]
Message-ID: <B9726D6DCCFB8B4CA276A9169B02216D4F3CB1B1@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <DF4PR84MB0137B5373358768B8DB298DF91B90@DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM>

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


      reply	other threads:[~2016-11-10 12:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 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=B9726D6DCCFB8B4CA276A9169B02216D4F3CB1B1@SHSMSX103.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