* Including machine specific mesa-driver
@ 2015-09-24 5:38 Nicolas Dechesne
2015-09-24 6:50 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dechesne @ 2015-09-24 5:38 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
hi,
in the qemu reference machine we see this pattern:
XSERVER = "xserver-xorg
\
${@bb.utils.contains('DISTRO_FEATURES', 'opengl',
'mesa-driver-swrast', '', d)}
\
Which is what I had done for my BSP layer as well. However this doesn't
take into account non X11 based graphics config, such as when building a
wayland/weston image. The mesa-driver should be conditionally pulled when
'mesa' is pulled in.
I cannot find a satisfying way of specifying this better to take both cases
into account.
we could move
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '',
d)}
into MACHINE_RRDEPENS, but that's not quite right, since that driver is
only needed when any of the mesa binary packages is in the image, and non
graphics image wouldnt' need that.
Since mesa produces a lot of binary packages , using RDEPENDS_xxx for all
of them doesn't seem very nice neither..
What would you recommend we do? I think we need to fix the qemu images
anyways.
cheers
[-- Attachment #2: Type: text/html, Size: 1835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Including machine specific mesa-driver
2015-09-24 5:38 Including machine specific mesa-driver Nicolas Dechesne
@ 2015-09-24 6:50 ` Richard Purdie
2015-09-24 18:36 ` Nicolas Dechesne
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2015-09-24 6:50 UTC (permalink / raw)
To: Nicolas Dechesne; +Cc: Patches and discussions about the oe-core layer
On Wed, 2015-09-23 at 22:38 -0700, Nicolas Dechesne wrote:
> in the qemu reference machine we see this pattern:
>
> XSERVER = "xserver-xorg
> \
> ${@bb.utils.contains('DISTRO_FEATURES', 'opengl',
> 'mesa-driver-swrast', '', d)}
> \
>
> Which is what I had done for my BSP layer as well. However this
> doesn't take into account non X11 based graphics config, such as when
> building a wayland/weston image. The mesa-driver should be
> conditionally pulled when 'mesa' is pulled in.
>
> I cannot find a satisfying way of specifying this better to take both
> cases into account.
>
> we could move
> ${@bb.utils.contains('DISTRO_FEATURES', 'opengl',
> 'mesa-driver-swrast', '', d)}
>
> into MACHINE_RRDEPENS, but that's not quite right, since that driver
> is only needed when any of the mesa binary packages is in the image,
> and non graphics image wouldnt' need that.
>
> Since mesa produces a lot of binary packages , using RDEPENDS_xxx for
> all of them doesn't seem very nice neither..
>
> What would you recommend we do? I think we need to fix the qemu images
> anyways.
The idea was that the machine config can nominate the "X11" config it
needs by indicating the drivers that make sense for this piece of
hardware. The XSERVER variable is then used to decide which pieces of X
to pull in and pulling in the right mesa pieces at the same time made
sense then.
We could split the mesa pieces out into a separate MESADRIVERS variable
and the wayland/weston could just pull those in? Ultimately its still
the machine config which has the knowledge of which drivers make sense
for a given platform. Exactly which piece of the system would pull in
MESADRIVERS is a good question but I've not looked at the metadata just
thinking out loud.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Including machine specific mesa-driver
2015-09-24 6:50 ` Richard Purdie
@ 2015-09-24 18:36 ` Nicolas Dechesne
2015-09-24 20:17 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Dechesne @ 2015-09-24 18:36 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
On Wed, Sep 23, 2015 at 11:50 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> The idea was that the machine config can nominate the "X11" config it
> needs by indicating the drivers that make sense for this piece of
> hardware. The XSERVER variable is then used to decide which pieces of X
> to pull in and pulling in the right mesa pieces at the same time made
> sense then.
right.
>
>
> We could split the mesa pieces out into a separate MESADRIVERS variable
> and the wayland/weston could just pull those in? Ultimately its still
> the machine config which has the knowledge of which drivers make sense
> for a given platform. Exactly which piece of the system would pull in
> MESADRIVERS is a good question but I've not looked at the metadata just
> thinking out loud.
it looks like it's either libGL (when using X/GLX) or libEGL that
would dynamically load the libary. So we might be able to do something
along these lines:
--- a/meta/conf/machine/include/qemu.inc
+++ b/meta/conf/machine/include/qemu.inc
@@ -5,12 +5,14 @@ PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
XSERVER ?= "xserver-xorg \
- ${@bb.utils.contains('DISTRO_FEATURES', 'opengl',
'mesa-driver-swrast', '', d)} \
xf86-input-evdev \
xf86-input-mouse \
xf86-video-fbdev \
xf86-input-keyboard"
+RDEPENDS_libgl-mesa = "${@bb.utils.contains('DISTRO_FEATURES',
'opengl', 'mesa-driver-swrast', '', d)}"
+RDEPENDS_libegl-mesa = "${@bb.utils.contains('DISTRO_FEATURES',
'opengl', 'mesa-driver-swrast', '', d)}"
+
MACHINE_FEATURES = "alsa bluetooth usbgadget screen"
MACHINEOVERRIDES =. "qemuall:"
-------
how does that look like?
It's untested for now, btw.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Including machine specific mesa-driver
2015-09-24 18:36 ` Nicolas Dechesne
@ 2015-09-24 20:17 ` Richard Purdie
0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2015-09-24 20:17 UTC (permalink / raw)
To: Nicolas Dechesne; +Cc: Patches and discussions about the oe-core layer
On Thu, 2015-09-24 at 11:36 -0700, Nicolas Dechesne wrote:
> On Wed, Sep 23, 2015 at 11:50 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > The idea was that the machine config can nominate the "X11" config it
> > needs by indicating the drivers that make sense for this piece of
> > hardware. The XSERVER variable is then used to decide which pieces of X
> > to pull in and pulling in the right mesa pieces at the same time made
> > sense then.
>
>
> right.
>
> >
> >
> > We could split the mesa pieces out into a separate MESADRIVERS variable
> > and the wayland/weston could just pull those in? Ultimately its still
> > the machine config which has the knowledge of which drivers make sense
> > for a given platform. Exactly which piece of the system would pull in
> > MESADRIVERS is a good question but I've not looked at the metadata just
> > thinking out loud.
>
> it looks like it's either libGL (when using X/GLX) or libEGL that
> would dynamically load the libary. So we might be able to do something
> along these lines:
>
> --- a/meta/conf/machine/include/qemu.inc
> +++ b/meta/conf/machine/include/qemu.inc
> @@ -5,12 +5,14 @@ PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
> PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
>
> XSERVER ?= "xserver-xorg \
> - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl',
> 'mesa-driver-swrast', '', d)} \
> xf86-input-evdev \
> xf86-input-mouse \
> xf86-video-fbdev \
> xf86-input-keyboard"
>
> +RDEPENDS_libgl-mesa = "${@bb.utils.contains('DISTRO_FEATURES',
> 'opengl', 'mesa-driver-swrast', '', d)}"
> +RDEPENDS_libegl-mesa = "${@bb.utils.contains('DISTRO_FEATURES',
> 'opengl', 'mesa-driver-swrast', '', d)}"
> +
> MACHINE_FEATURES = "alsa bluetooth usbgadget screen"
>
> MACHINEOVERRIDES =. "qemuall:"
>
> -------
>
> how does that look like?
>
> It's untested for now, btw.
It would make mesa machine specific which probably isn't what we
want :/.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-24 20:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-24 5:38 Including machine specific mesa-driver Nicolas Dechesne
2015-09-24 6:50 ` Richard Purdie
2015-09-24 18:36 ` Nicolas Dechesne
2015-09-24 20:17 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox