mesa: fix RPROVIDEd package names
PATCH v3 1/8 mesa: fix RPROVIDEd package names
The BCP for virtual runtime package names is virtual-foo. Make mesa follow the established convention and change the names of the provied packages to virtual-foo-icd.
--- meta/recipes-graphics/mesa/mesa.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -1
@@ -284,7 +284,7 @@ python __anonymous() { if 'glvnd' in pkgconfig: for p in ("libegl", "libglx"): fullp = mlprefix + p + "-mesa" + suffix - d.appendVar("RPROVIDES:" + fullp, '%s-icd' % p) + d.appendVar("RPROVIDES:" + fullp, ' virtual-%s-icd' % p) else: for p in (("egl", "libegl", "libegl1"), ("opengl", "libgl", "libgl1"),
Signature · 1 line
2.39.5
PATCH v3 2/8 default-providers: fix GLVND providers to be selected at runtime
The virtual-{libegl,libglx}-icd names are RPROVIDES, not PROVIDES, because they are a runtime dependency of libglvnd. Make default-providers follow that and specify PREFERRED_RPROVIDER instead of PREFERRED_PROVIDER for those names.
--- meta/conf/distro/include/default-providers.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/default-providers.inc +2 -2
@@ -7,9 +7,7 @@ PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2" PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native" PREFERRED_PROVIDER_virtual/egl ?= "mesa" -PREFERRED_PROVIDER_virtual/libegl-icd ?= "mesa" PREFERRED_PROVIDER_virtual/libgl ?= "mesa" -PREFERRED_PROVIDER_virtual/libglx-icd ?= "mesa" PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
@@ -68,4 +66,6 @@ PREFERRED_RPROVIDER_initd-functions ?= "initscripts" PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa" PREFERRED_PROVIDER_virtual/nativesdk-libsdl2 ?= "nativesdk-libsdl2" +PREFERRED_RPROVIDER_virtual-libegl-icd ?= "mesa" +PREFERRED_RPROVIDER_virtual-libglx-icd ?= "mesa" PREFERRED_RPROVIDER_virtual-x-terminal-emulator ?= "rxvt-unicode"
Signature · 1 line
2.39.5
PATCH v3 3/8 qemux86: drop duplicates with qemu.inc
In reply to Dmitry Baryshkovqemu.inc already includes PREFERRED_PROVIDER values for xserver and GL libraries. Drop the same values being set in the machine config.
--- meta/conf/machine/qemux86.conf | 6 ------ 1 file changed, 6 deletions(-)
meta/conf/machine/qemux86.conf +0 -6
@@ -2,12 +2,6 @@ #@NAME: QEMU x86 machine #@DESCRIPTION: Machine configuration for running an x86 system on QEMU -PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa" - require conf/machine/include/qemu.inc DEFAULTTUNE ?= "core2-32" require conf/machine/include/x86/tune-corei7.inc
Signature · 1 line
2.39.5
PATCH v3 4/8 qemux86-64: drop duplicates with qemu.inc
In reply to Dmitry Baryshkovqemu.inc already includes PREFERRED_PROVIDER values for xserver and GL libraries. Drop the same values being set in the machine config.
--- meta/conf/machine/qemux86-64.conf | 6 ------ 1 file changed, 6 deletions(-)
meta/conf/machine/qemux86-64.conf +0 -6
@@ -2,12 +2,6 @@ #@NAME: QEMU x86-64 machine #@DESCRIPTION: Machine configuration for running an x86-64 system on QEMU -PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa" - require conf/machine/include/qemu.inc DEFAULTTUNE ?= "core2-64" require conf/machine/include/x86/tune-x86-64-v3.inc
Signature · 1 line
2.39.5
PATCH v3 5/8 libglvnd: migrate from meta-oe
In reply to Dmitry Baryshkovlibglvnd is a vendor-neutral approach to handling OpenGL / OpenGL ES / EGL / GLX libraries. It has been proposed and initially implemented by NVIDIA in order to simplify coinstallation of GL drivers provided by different vendors. Major Linux distributions (Debian, Ubuntu, Fedora, etc.) have already switched to libglvnd.
Having libglvnd in OE-Core simplifies integration of this ABI into distro and BSP layers (e.g. it will help meta-tegra, which currently provides its own version of the recipe).
Import recipe for libglvnd from the meta-oe layer (changes: fix virtual package names, add add the SUMMARY data, drop git@ from SRC_URI, require glvnd DISTRO_FEATURE).
--- meta/conf/distro/include/maintainers.inc | 1 + .../libglvnd/libglvnd_1.7.0.bb | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -353,6 +353,7 @@ RECIPE_MAINTAINER:pn-libgcrypt = "Hongxu Jia <[email protected]>" RECIPE_MAINTAINER:pn-libgfortran = "Khem Raj <[email protected]>" RECIPE_MAINTAINER:pn-libgit2 = "Unassigned <[email protected]>" RECIPE_MAINTAINER:pn-libgloss = "Alejandro Hernandez <[email protected]>" +RECIPE_MAINTAINER:pn-libglvnd = "Dmitry Baryshkov <[email protected]>" RECIPE_MAINTAINER:pn-libglu = "Ross Burton <[email protected]>" RECIPE_MAINTAINER:pn-libgpg-error = "Hongxu Jia <[email protected]>" RECIPE_MAINTAINER:pn-libgudev = "Ross Burton <[email protected]>"
meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb new file +39 -0
@@ -0,0 +1,39 @@ +SUMMARY = "the GL Vendor-Neutral Dispatch library" +DESCRIPTION = "libglvnd is a vendor-neutral dispatch layer for arbitrating \ +OpenGL API calls between multiple vendors." +HOMEPAGE = "https://gitlab.freedesktop.org/glvnd/libglvnd" +LICENSE = "MIT & BSD-1-Clause & BSD-3-Clause & GPL-3.0-with-autoconf-exception" +LIC_FILES_CHKSUM = "file://README.md;beginline=323;md5=7ac5f0111f648b92fe5427efeb08e8c4" + +SRC_URI = "git://gitlab.freedesktop.org/glvnd/libglvnd.git;protocol=https;branch=master" + +SRCREV = "faa23f21fc677af5792825dc30cb1ccef4bf33a6" + +REQUIRED_DISTRO_FEATURES = "opengl glvnd" + +inherit meson pkgconfig features_check + +S = "${WORKDIR}/git" + +PACKAGECONFIG ?= "\ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl gles1 gles2', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)} \ + " + +PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libx11 libxext xorgproto" +PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,libx11 libxext xorgproto,,virtual-libglx-icd" +PACKAGECONFIG[egl] = "-Degl=true,-Degl=false,,virtual-libegl-icd" +PACKAGECONFIG[gles1] = "-Dgles1=true,-Dgles1=false," +PACKAGECONFIG[gles2] = "-Dgles2=true,-Dgles2=false," + +BBCLASSEXTEND = "native nativesdk" + +PROVIDES = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'glx', 'virtual/libgl', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gles1', 'virtual/libgles1', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gles2', 'virtual/libgles2 virtual/libgles3', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ +" + +RPROVIDES:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'egl', 'libegl', '', d)}"
Signature · 1 line
2.39.5
PATCH v3 6/8 mesa: enable glvnd if it is enabled in DISTRO_FEATURES
In reply to Dmitry BaryshkovLet the distro to be a central authority regarding GLVND feature. Make mesa.inc enable glvnd PACKAGECONFIG if it is enabled in DISTRO_FEATURES.
--- meta/recipes-graphics/mesa/mesa.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -1
@@ -85,7 +85,7 @@ def strip_comma(s): PACKAGECONFIG = " \ gallium \ video-codecs \ - ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland glvnd', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \ "
Signature · 1 line
2.39.5
PATCH v3 7/8 default-providers: handle GLVND-related providers
In reply to Dmitry BaryshkovIf GLVND is enabled, then libglvnd is providing all OpenGL / ES libraries. Tune default-providers.inc to select a correct package in this case.
--- meta/conf/distro/include/default-providers.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
meta/conf/distro/include/default-providers.inc +7 -7
@@ -6,13 +6,13 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2" PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native" -PREFERRED_PROVIDER_virtual/egl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" -PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" -PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'glvnd', 'libglvnd', 'mesa',d)}" +PREFERRED_PROVIDER_virtual/libgl-native ?= "${@bb.utils.contains('DISTRO_FEATURES', 'glvnd', 'libglvnd-native', 'mesa-native',d)}" +PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "${@bb.utils.contains('DISTRO_FEATURES', 'glvnd', 'nativesdk-libglvnd', 'nativesdk-mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles1 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'glvnd', 'libglvnd', 'mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'glvnd', 'libglvnd', 'mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles3 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'glvnd', 'libglvnd', 'mesa',d)}" PREFERRED_PROVIDER_virtual/mesa ?= "mesa" PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg-utils" PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-utils-native"
Signature · 1 line
2.39.5
PATCH v3 8/8 qemu.inc: handle GLVND-related providers
In reply to Dmitry BaryshkovIf GLVND is enabled, then libglvnd is providing all OpenGL / ES libraries. Tune qemu.inc to select a correct package in this case.
--- meta/conf/machine/include/qemu.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
meta/conf/machine/include/qemu.inc +5 -5
@@ -1,9 +1,9 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" -PREFERRED_PROVIDER_virtual/egl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles1 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles3 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" XSERVER ?= "xserver-xorg \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \
Signature · 1 line
2.39.5
Re: [OE-core] [PATCH v3 8/8] qemu.inc: handle GLVND-related providers
Quoted 15 lines · Dmitry Baryshkov via lists.openembedded.org
If GLVND is enabled, then libglvnd is providing all OpenGL / ES libraries. Tune qemu.inc to select a correct package in this case.
Signed-off-by Dmitry Baryshkov <[email protected]>--- meta/conf/machine/include/qemu.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)meta/conf/machine/include/qemu.inc +0
-0@@ -1,9 +1,9 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
meta/conf/machine/include/qemu.inc line 6
Quoted 10 lines
meta/conf/machine/include/qemu.inc +5
-5-PREFERRED_PROVIDER_virtual/egl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles1 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles3 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}"
The above is interesting. The defaults for these are already specified in the distro/include/default-provders.inc. This should be where this kind of change goes (or in a specific distro or other conf file if the defaults are overwritten.)
Setting these in qemu seems like a duplicate and really looks like the wrong thing to duplicate unless there is a specific machine reason to override the default provider for the system.
Unless this doesn't work, I'd simply remove the entries from qemu.inc.
(you already dropped the other duplicates in the qemu files, which is definitely the right thing to do.)
--Mark
Quoted 13 lines
meta/conf/machine/include/qemu.inc +0
-1XSERVER ?= "xserver-xorg \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \ -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#218842): https://lists.openembedded.org/g/openembedded-core/message/218842
Mute This Topic: https://lists.openembedded.org/mt/113673610/3616948
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH v3 8/8] qemu.inc: handle GLVND-related providers
Quoted 34 lines · Mark Hatle
Quoted 15 lines · Dmitry Baryshkov via lists.openembedded.org
If GLVND is enabled, then libglvnd is providing all OpenGL / ES libraries. Tune qemu.inc to select a correct package in this case.
Signed-off-by Dmitry Baryshkov <[email protected]>--- meta/conf/machine/include/qemu.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)meta/conf/machine/include/qemu.inc +0
-0@@ -1,9 +1,9 @@ PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"meta/conf/machine/include/qemu.inc line 6
Quoted 10 lines
meta/conf/machine/include/qemu.inc +5
-5-PREFERRED_PROVIDER_virtual/egl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgl ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa" -PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa" +PREFERRED_PROVIDER_virtual/egl ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgl ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles1 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles2 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}" +PREFERRED_PROVIDER_virtual/libgles3 ?= "${@bb.utils.contains('DISTRO_FEATURES','glvnd','libglvnd','mesa',d)}"The above is interesting. The defaults for these are already specified in the distro/include/default-provders.inc. This should be where this kind of change goes (or in a specific distro or other conf file if the defaults are overwritten.)
Quoted 3 lines
Setting these in qemu seems like a duplicate and really looks like the wrong thing to duplicate unless there is a specific machine reason to override the default provider for the system.
I think there is a difference between DISTRO-induced defaults and MACHINE specifics. But I agree here, it should be fine to drop those defaults.
Quoted 21 lines
Unless this doesn't work, I'd simply remove the entries from qemu.inc.
(you already dropped the other duplicates in the qemu files, which is definitely the right thing to do.)
--Mark
Quoted 13 lines
meta/conf/machine/include/qemu.inc +0
-1XSERVER ?= "xserver-xorg \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \ -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#218842): https://lists.openembedded.org/g/openembedded-core/message/218842
Mute This Topic: https://lists.openembedded.org/mt/113673610/3616948
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
With best wishes Dmitry