From: "Kinney, Michael D" <michael.d.kinney@intel.com>
To: Pankaj Bansal <pankaj.bansal@nxp.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Cc: "Gao, Liming" <liming.gao@intel.com>
Subject: Re: [RFC] Add Platform Include path in modules
Date: Mon, 26 Feb 2018 07:42:42 +0000 [thread overview]
Message-ID: <E92EE9817A31E24EB0585FDF735412F5B896C362@ORSMSX113.amr.corp.intel.com> (raw)
In-Reply-To: <1519626521-15902-1-git-send-email-pankaj.bansal@nxp.com>
Hi,
Can you provide a simple example that shows how
this feature is used and how it works?
Thanks,
Mike
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-
> bounces@lists.01.org] On Behalf Of Pankaj Bansal
> Sent: Sunday, February 25, 2018 10:29 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [edk2] [RFC] Add Platform Include path in
> modules
>
> When we are writing the drivers for IP modules, then
> sometimes we want
> that Platform specific customizations or platform
> dependent values be
> supplied to IP module driver. normally we achieve this
> using Pcd values.
>
> But sometimes we want to use header files for such
> data.e.g. if the
> values are complex structures.
>
> we need a mechanism that platform be able to supply
> these header files
> to a module, without changing module code.
>
> This patch is an attempt to achieve this functionality.
>
> Cc: Yonghong Zhu <yonghong.zhu@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
> ---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 12
> ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index 405bfa1..de4a17c 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -3783,6 +3783,18 @@ class ModuleAutoGen(AutoGen):
> for Inc in IncludesList:
> if Inc not in
> self._IncludePathList:
>
> self._IncludePathList.append(str(Inc))
> + PackageFile =
> PathClass(os.path.join(self.PlatformInfo.MetaFile.SubDir
> , self.PlatformInfo.MetaFile.BaseName + '.dec'),
> self.PlatformInfo.MetaFile.Root)
> + Package = self.BuildDatabase[PackageFile,
> self.Arch, self.BuildTarget, self.ToolChain]
> + PackageDir = mws.join(self.WorkspaceDir,
> Package.MetaFile.Dir)
> + if PackageDir not in self._IncludePathList:
> +
> self._IncludePathList.append(PackageDir)
> + IncludesList = Package.Includes
> + if Package._PrivateIncludes:
> + if not
> self.MetaFile.Path.startswith(PackageDir):
> + IncludesList =
> list(set(Package.Includes).difference(set(Package._Priva
> teIncludes)))
> + for Inc in IncludesList:
> + if Inc not in self._IncludePathList:
> +
> self._IncludePathList.append(str(Inc))
> return self._IncludePathList
>
> def _GetIncludePathLength(self):
> --
> 2.7.4
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2018-02-26 7:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 6:28 [RFC] Add Platform Include path in modules Pankaj Bansal
2018-02-26 7:42 ` Kinney, Michael D [this message]
2018-02-26 10:55 ` Pankaj Bansal
2018-02-26 15:55 ` Laszlo Ersek
2018-02-26 17:25 ` Kinney, Michael D
2018-02-27 7:39 ` Pankaj Bansal
2018-02-27 11:21 ` Gao, Liming
2018-03-09 10:54 ` Pankaj Bansal
2018-03-09 17:29 ` Kinney, Michael D
2018-02-26 12:55 ` [RFC v2] " Pankaj Bansal
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=E92EE9817A31E24EB0585FDF735412F5B896C362@ORSMSX113.amr.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