All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Crowe <mac@mcrowe.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] Correct way to set DRIDRIVERS and GALLIUMDRIVERS from mesa bbappend
Date: Wed, 1 Dec 2021 18:05:59 +0000	[thread overview]
Message-ID: <Yae5h9EsXqA0ycqU@mcrowe.com> (raw)
In-Reply-To: <CANNYZj-7YLRwgbCDusZv98B0RSkzVbKPZWJm6r=akEXysLGT0g@mail.gmail.com>

Hi Alex,

Thanks for responding.

Just to make sure I understand, you think that I should add something like:

 PACKAGECONFIG[i915] = ""
 PACKAGECONFIG[iris] = ""
 PACKAGECONFIG[crocus] = ""
 GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'i915', ',i915', '', d)}"
 GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'iris', ',iris', '', d)}"
 GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'crocus', ',crocus', '', d)}"

But then I need to find a way to get "i915 iris crocus" into PACKAGECONFIG
for x86 and x86-64 whilst still letting others override that. The best I
can come up with is to modify the existing default PACKAGECONFIG to be
something like:

 PACKAGECONFIG_DEFAULT_FOR_TARGET:x86 = "i915 iris crocus"
 PACKAGECONFIG_DEFAULT_FOR_TARGET:x86-64 = "i915 iris crocus"
 PACKAGECONFIG:class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium virgl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
                    elf-tls \
                    ${PACKAGECONFIG_DEFAULT_FOR_TARGET} \
                    "

This will probably break anyone who currently sets their own PACKAGECONFIG
for x86 and x86-64 until they add the drivers they require. This would seem
to be worse than my GALLIUMDRIVERS_DEFAULT suggestion. :(

Have I misunderstood you, or is there a better way?

Thanks.

Mike.

On Wednesday 01 December 2021 at 18:21:44 +0100, Alexander Kanavin wrote:
> I think you do need to modify oe-core unfortunately, like is done for other
> drivers:
> 
> PACKAGECONFIG[etnaviv] = ""
> GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv',
> ',etnaviv', '', d)}"
> 
> Alex
> 
> On Wed, 1 Dec 2021 at 17:44, Mike Crowe via lists.openembedded.org <mac=
> mcrowe.com@lists.openembedded.org> wrote:
> 
> > I'm building for a specific chip and therefore don't wish to waste time and
> > electricity building and disk space on the target installing unwanted mesa
> > drivers. However, mesa.inc contains:
> >
> >  GALLIUMDRIVERS = "swrast"
> >  GALLIUMDRIVERS:x86-x32 = ""
> >  GALLIUMDRIVERS:append:x86:class-target = ",i915,iris,crocus"
> >  GALLIUMDRIVERS:append:x86-64:class-target = ",i915,iris,crocus"
> >
> > and mesa_21.3.0.bb contains:
> >
> >  DRIDRIVERS ??= ""
> >  DRIDRIVERS:append:x86:class-target = ",r100,r200,nouveau,i965"
> >  DRIDRIVERS:append:x86-64:class-target = ",r100,r200,nouveau,i965"
> >
> > I'm unable to find a way to override these values. Using (for example):
> >
> >  DRIDRIVERS:forcevariable = ""
> >  GALLIUMDRIVERS:forcevariable = "swrast"
> >
> > doesn't work because the append still happens after the forcevariable
> > override takes effect. :(
> >
> > Is there a way that I can override GALLIUMDRIVERS and DRIDRIVERS with my
> > own values for x86 and x86-64 without modifying oe-core itself?
> >
> > If not, should the oe-core recipe being using something like:
> >
> >  GALLIUMDRIVERS_DEFAULT = "swrast"
> >  GALLIUMDRIVERS_DEFAULT:x86-x32 = ""
> >  GALLIUMDRIVERS_DEFAULT:append:x86:class-target = ",i915,iris,crocus"
> >  GALLIUMDRIVERS_DEFAULT:append:x86-64:class-target = ",i915,iris,crocus"
> >  GALLIUMDRIVERS ?= "${GALLIUMDRIVERS_DEFAULT}"
> >
> > and similar for DRIDRIVERS to support this?
> >
> > Thanks.
> >
> > Mike.
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#159048):
> > https://lists.openembedded.org/g/openembedded-core/message/159048
> > Mute This Topic: https://lists.openembedded.org/mt/87432435/1686489
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> > alex.kanavin@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
> >


  reply	other threads:[~2021-12-01 18:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 16:43 Correct way to set DRIDRIVERS and GALLIUMDRIVERS from mesa bbappend Mike Crowe
2021-12-01 17:21 ` [OE-core] " Alexander Kanavin
2021-12-01 18:05   ` Mike Crowe [this message]
2021-12-01 20:33     ` Alexander Kanavin
2021-12-02 15:58       ` Mike Crowe
2021-12-01 19:18 ` Justin Bronder
2021-12-01 20:20   ` Mike Crowe
2021-12-02 17:00     ` [OE-core] " Richard Purdie

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-all 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=Yae5h9EsXqA0ycqU@mcrowe.com \
    --to=mac@mcrowe.com \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.