On Fri, Aug 31, 2018 at 08:41:40AM +0000, Baeuerle, Florian wrote:
> Am Donnerstag, den 30.08.2018, 11:41 +0200 schrieb Michael Olbrich:
> > > > > Let's say I want to build App D on two platforms, each requiring
> > > > > different
> > > > > graphic drivers (SGX is a nightmare), I wouldn't really know how to
> > > > > do that
> > > > > properly.
> > > >
> > > > Hmm, we have something like this already: The 'platform-opengl' package
> > > > defaults to Mesa, but you can a platform specific rule in each
> > > > platform. I
> > > > used this in the past for Mesa vs. Vivante.
> > >
> > > That would, however, only work if it would be one package?
> > > For am335x with gpu, I need three packages: the OOT kernel module, a
> > > franken-patched
> > > libgbm and the blobs (libEGL, GLES, libpvr*, etc.).
> > >
> > > When i override platform-opengl through configs/platform-a, then these
> > > three packages'
> > > symbols would end up in my ptxconfig, so my ptxconfig is more or less
> > > tied to my platform.
> >
> > Add platform-opengl and the extra packages to the platformconfig and add
> > the dependencies there. If platform-opengl is enabled in both configs, then
> > any dependencies will be handled correctly.
> >
>
> I added the three packages to
>
> $platform_a/platforms
>
> and an override for platform-opengl, selecting the three packages in
>
> $platform_a/rules/platform-opengl.in
>
> as a result, I have the three symbols in my ptxconfig, which I do not want.
>
> If i add it in $platform_a/platforms/platform-opengl.in with the
> project_version
> section, defaulting to y, "ptxdist menuconfig platform" spits out a bunch of
> errors due to references to undefined symbols (the dependencies of the three
> packages).
>
> What I'd like is:
>
> ptxconfig + platform a -> installs ti-sgx-drivers
> ptxconfig + platform b -> installs other platform-dependent driver
>
> That would mean some sort of dependency resolving that happens at some later
> point. If I understand correctly, that happens during menuconfig, resulting in
> a {ptx,platform}config.
>
> I think I am missing something. Googling, trial and error and the commit logs
> did not get my anywhere. Further help greatly appreciated, I'm volunteering to
> write documentation on this, if desired.
You need:
$platform_a/rules/platform-opengl.in with no dependencies
$platform_a/platforms/platform-opengl.in that depends on ti-sgx-drivers
$platform_a/platforms/*.in for ti-sgx-drivers
These must have a section that exists for the platformconfig, e.g.
'architecture_options'. Don't use prompts and set 'default y' for
platform-opengl here.
Then the symbols will be in the platformconfig.
Do the samge for platform b.
At build-time it does not matter if the package is selected in the
ptxconfig or the platformconfig.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
[email protected]