mesa-pvr: convert bbappend into standalone alternative provider
PATCH 1/1 mesa-pvr: convert bbappend into standalone alternative provider
From: Denys Dmytriyenko <[email protected]>
There are some unobvious issues with adding PVR support to Mesa via a bbappend:
1. We need to mark mesa package as machine-specific, due to differences in builds between SGX, Rogue and software-rendering
2. We also need to then mark mesa package as providing safe ABIs (EGL/GLES/GBM) in order for all generic dependent packages to not be treated as machine-specific, allowing their re-use across different machines of the same architecture
But doing the above alters the upstream mesa package and changes its signatures even when not building for TI platforms, which is a Yocto Project compliance violation.
In order to resolve this issue, convert Mesa bbappend, that adds PVR support, into its own standalone alternative provider, called mesa-pvr and allow selecting it with PREFERRED_PROVIDER settings.
---
meta-ti-bsp/conf/layer.conf | 2 +-
meta-ti-bsp/conf/machine/beagleplay.conf | 1 +
meta-ti-bsp/conf/machine/include/am62xx.inc | 1 +
meta-ti-bsp/conf/machine/include/am65xx.inc | 1 +
meta-ti-bsp/conf/machine/include/j721e.inc | 1 +
meta-ti-bsp/conf/machine/include/j721s2.inc | 1 +
meta-ti-bsp/conf/machine/include/j784s4.inc | 1 +
meta-ti-bsp/conf/machine/include/mesa-pvr.inc | 8 ++++++++
meta-ti-bsp/conf/machine/include/omap-a15.inc | 1 +
meta-ti-bsp/conf/machine/include/ti33x.inc | 1 +
meta-ti-bsp/conf/machine/include/ti43x.inc | 1 +
.../recipes-graphics/mesa/mesa-gl_23.%.bbappend | 1 -
.../mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} | 10 ++++++----
meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend | 1 -
14 files changed, 24 insertions(+), 7 deletions(-)
create mode 100644 meta-ti-bsp/conf/machine/include/mesa-pvr.inc
delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend
rename meta-ti-bsp/recipes-graphics/mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} (88%)
delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappendmeta-ti-bsp/conf/layer.conf +1 -1
@@ -19,7 +19,7 @@ LAYERDEPENDS_meta-ti-bsp = " \ " SIGGEN_EXCLUDERECIPES_ABISAFE += " \ - mesa \ + mesa-pvr \ " HOSTTOOLS_NONFATAL += "truncate xxd comm"
meta-ti-bsp/conf/machine/beagleplay.conf +1 -0
@@ -10,6 +10,7 @@ MACHINE_FEATURES += "screen gpu" SERIAL_CONSOLES = "115200;ttyS2" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "lite"
meta-ti-bsp/conf/machine/include/am62xx.inc +1 -0
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am62xx" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # Default tiboot3.bin on AM62x is for HS-FS
meta-ti-bsp/conf/machine/include/am65xx.inc +1 -0
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am65xx" MACHINE_FEATURES += "screen touchscreen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" KERNEL_DEVICETREE_PREFIX = "ti/k3-am654"
meta-ti-bsp/conf/machine/include/j721e.inc +1 -0
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721e" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fw
meta-ti-bsp/conf/machine/include/j721s2.inc +1 -0
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721s2" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "generic"
meta-ti-bsp/conf/machine/include/j784s4.inc +1 -0
@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j784s4" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "j784s4"
meta-ti-bsp/conf/machine/include/mesa-pvr.inc new file +8 -0
@@ -0,0 +1,8 @@ +PREFERRED_PROVIDER_virtual/mesa ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/egl ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgbm ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libglx ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa-pvr"
meta-ti-bsp/conf/machine/include/omap-a15.inc +1 -0
@@ -12,6 +12,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
meta-ti-bsp/conf/machine/include/ti33x.inc +1 -0
@@ -13,6 +13,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc"
meta-ti-bsp/conf/machine/include/ti43x.inc +1 -0
@@ -13,6 +13,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend deleted +0 -1
@@ -1 +0,0 @@ -require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb renamed from meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc +6 -4
@@ -2,11 +2,13 @@ # upstream yet. This allows us to build the shims we need without completely # clobbering mesa. -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +require recipes-graphics/mesa/mesa.inc + +SUMMARY += " (with PowerVR support for TI platforms)" LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" -BRANCH = "powervr/kirkstone/22.3.5" +BRANCH = "powervr/kirkstone/${PV}" SRC_URI = " \ git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
@@ -38,7 +40,6 @@ PACKAGECONFIG:remove = "xvmc" PACKAGECONFIG[xvmc] = "" PACKAGE_ARCH = "${MACHINE_ARCH}" -PV = "22.3.5+pvr" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
@@ -50,6 +51,7 @@ do_install:append () { rm -rf ${D}${datadir}/pkgconfig } -FILES:mesa-vulkan-drivers += " ${libdir}/libpvr_mesa_wsi.so" +FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" +FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"
meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend deleted +0 -1
@@ -1 +0,0 @@ -require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
Signature · 1 line
2.25.1
This does not apply against kirkstone cleanly because of the mesa version change from 22 to 23 for master. I'll fix it as I apply the patch, but I wanted to inform anyone trying it themselves.
Quoted 243 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
There are some unobvious issues with adding PVR support to Mesa via a bbappend:
1. We need to mark mesa package as machine-specific, due to differences in builds between SGX, Rogue and software-rendering
2. We also need to then mark mesa package as providing safe ABIs (EGL/GLES/GBM) in order for all generic dependent packages to not be treated as machine-specific, allowing their re-use across different machines of the same architecture
But doing the above alters the upstream mesa package and changes its signatures even when not building for TI platforms, which is a Yocto Project compliance violation.
In order to resolve this issue, convert Mesa bbappend, that adds PVR support, into its own standalone alternative provider, called mesa-pvr and allow selecting it with
PREFERRED_PROVIDERsettings.Signed-off-by Denys Dmytriyenko <[email protected]>--- meta-ti-bsp/conf/layer.conf | 2 +- meta-ti-bsp/conf/machine/beagleplay.conf | 1 + meta-ti-bsp/conf/machine/include/am62xx.inc | 1 + meta-ti-bsp/conf/machine/include/am65xx.inc | 1 + meta-ti-bsp/conf/machine/include/j721e.inc | 1 + meta-ti-bsp/conf/machine/include/j721s2.inc | 1 + meta-ti-bsp/conf/machine/include/j784s4.inc | 1 + meta-ti-bsp/conf/machine/include/mesa-pvr.inc | 8 ++++++++ meta-ti-bsp/conf/machine/include/omap-a15.inc | 1 + meta-ti-bsp/conf/machine/include/ti33x.inc | 1 + meta-ti-bsp/conf/machine/include/ti43x.inc | 1 + .../recipes-graphics/mesa/mesa-gl_23.%.bbappend | 1 - .../mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} | 10 ++++++---- meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend | 1 - 14 files changed, 24 insertions(+), 7 deletions(-)create mode 100644 meta-ti-bsp/conf/machine/include/mesa-pvr.inc delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend rename meta-ti-bsp/recipes-graphics/mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} (88%) delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend
meta-ti-bsp/conf/layer.conf +1
-1@@ -19,7 +19,7 @@ LAYERDEPENDS_meta-ti-bsp = " \ " SIGGEN_EXCLUDERECIPES_ABISAFE += " \ - mesa \ + mesa-pvr \ " HOSTTOOLS_NONFATAL += "truncate xxd comm"meta-ti-bsp/conf/machine/beagleplay.conf +1
-0@@ -10,6 +10,7 @@ MACHINE_FEATURES += "screen gpu" SERIAL_CONSOLES = "115200;ttyS2" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "lite"meta-ti-bsp/conf/machine/include/am62xx.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am62xx" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # Default tiboot3.bin on AM62x is for HS-FSmeta-ti-bsp/conf/machine/include/am65xx.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am65xx" MACHINE_FEATURES += "screen touchscreen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" KERNEL_DEVICETREE_PREFIX = "ti/k3-am654"meta-ti-bsp/conf/machine/include/j721e.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721e" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fwmeta-ti-bsp/conf/machine/include/j721s2.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721s2" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "generic"meta-ti-bsp/conf/machine/include/j784s4.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j784s4" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "j784s4"meta-ti-bsp/conf/machine/include/mesa-pvr.inc new file +8
-0@@ -0,0 +1,8 @@ +PREFERRED_PROVIDER_virtual/mesa ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/egl ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgbm ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libglx ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa-pvr"meta-ti-bsp/conf/machine/include/omap-a15.inc +1
-0@@ -12,6 +12,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"meta-ti-bsp/conf/machine/include/ti33x.inc +1
-0@@ -13,6 +13,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc"meta-ti-bsp/conf/machine/include/ti43x.inc +1
-0@@ -13,6 +13,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging" PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging" # Graphics providers and variables +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend deleted +0
-1@@ -1 +0,0 @@ -require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}meta-ti-bsp/recipes-graphics/mesa/mesa-pvr_22.3.5.bb renamed from meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc +6
-4@@ -2,11 +2,13 @@ # upstream yet. This allows us to build the shims we need without completely # clobbering mesa. -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +require recipes-graphics/mesa/mesa.inc + +SUMMARY += " (with PowerVR support for TI platforms)" LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10" -BRANCH = "powervr/kirkstone/22.3.5" +BRANCH = "powervr/kirkstone/${PV}" SRC_URI = " \ git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \@@ -38,7 +40,6 @@ PACKAGECONFIG:remove = "xvmc" PACKAGECONFIG[xvmc] = "" PACKAGE_ARCH = "${MACHINE_ARCH}" -PV = "22.3.5+pvr" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"@@ -50,6 +51,7 @@ do_install:append () { rm -rf ${D}${datadir}/pkgconfig } -FILES:mesa-vulkan-drivers += " ${libdir}/libpvr_mesa_wsi.so" +FILES:${PN}-dev += "${datadir}/mesa/wayland-drm.xml" +FILES:mesa-vulkan-drivers += "${libdir}/libpvr_mesa_wsi.so" RRECOMMENDS:mesa-megadriver:append:class-target = " ${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend deleted +0
-2@@ -1 +0,0 @@ -require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)} -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#16516): https://lists.yoctoproject.org/g/meta-ti/message/16516
Mute This Topic: https://lists.yoctoproject.org/mt/98834047/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/leave/10828724/6551054/1815494134/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
Quoted 134 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
There are some unobvious issues with adding PVR support to Mesa via a bbappend:
1. We need to mark mesa package as machine-specific, due to differences in builds between SGX, Rogue and software-rendering
2. We also need to then mark mesa package as providing safe ABIs (EGL/GLES/GBM) in order for all generic dependent packages to not be treated as machine-specific, allowing their re-use across different machines of the same architecture
But doing the above alters the upstream mesa package and changes its signatures even when not building for TI platforms, which is a Yocto Project compliance violation.
In order to resolve this issue, convert Mesa bbappend, that adds PVR support, into its own standalone alternative provider, called mesa-pvr and allow selecting it with
PREFERRED_PROVIDERsettings.Signed-off-by Denys Dmytriyenko <[email protected]>--- meta-ti-bsp/conf/layer.conf | 2 +- meta-ti-bsp/conf/machine/beagleplay.conf | 1 + meta-ti-bsp/conf/machine/include/am62xx.inc | 1 + meta-ti-bsp/conf/machine/include/am65xx.inc | 1 + meta-ti-bsp/conf/machine/include/j721e.inc | 1 + meta-ti-bsp/conf/machine/include/j721s2.inc | 1 + meta-ti-bsp/conf/machine/include/j784s4.inc | 1 + meta-ti-bsp/conf/machine/include/mesa-pvr.inc | 8 ++++++++ meta-ti-bsp/conf/machine/include/omap-a15.inc | 1 + meta-ti-bsp/conf/machine/include/ti33x.inc | 1 + meta-ti-bsp/conf/machine/include/ti43x.inc | 1 + .../recipes-graphics/mesa/mesa-gl_23.%.bbappend | 1 - .../mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} | 10 ++++++---- meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend | 1 - 14 files changed, 24 insertions(+), 7 deletions(-)create mode 100644 meta-ti-bsp/conf/machine/include/mesa-pvr.inc delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend rename meta-ti-bsp/recipes-graphics/mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} (88%) delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend
meta-ti-bsp/conf/layer.conf +1
-1@@ -19,7 +19,7 @@ LAYERDEPENDS_meta-ti-bsp = " \ " SIGGEN_EXCLUDERECIPES_ABISAFE += " \ - mesa \ + mesa-pvr \ " HOSTTOOLS_NONFATAL += "truncate xxd comm"meta-ti-bsp/conf/machine/beagleplay.conf +1
-0@@ -10,6 +10,7 @@ MACHINE_FEATURES += "screen gpu" SERIAL_CONSOLES = "115200;ttyS2" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "lite"meta-ti-bsp/conf/machine/include/am62xx.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am62xx" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # Default tiboot3.bin on AM62x is for HS-FSmeta-ti-bsp/conf/machine/include/am65xx.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am65xx" MACHINE_FEATURES += "screen touchscreen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" KERNEL_DEVICETREE_PREFIX = "ti/k3-am654"meta-ti-bsp/conf/machine/include/j721e.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721e" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fwmeta-ti-bsp/conf/machine/include/j721s2.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721s2" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "generic"meta-ti-bsp/conf/machine/include/j784s4.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j784s4" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "j784s4"meta-ti-bsp/conf/machine/include/mesa-pvr.inc new file +0
-0
meta-ti-bsp/conf/machine/include/mesa-pvr.inc line 8
Quoted 8 lines
meta-ti-bsp/conf/machine/include/mesa-pvr.inc new file +8
-0@@ -0,0 +1,8 @@ +PREFERRED_PROVIDER_virtual/mesa ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/egl ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgbm ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libglx ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa-pvr"
[snip]
I'm concerned a potential version drift between mesa-native packages and mesa-target packages in this configuration, but otherwise this doesn't appear to cause any issues with target packages or dependency chains at the moment.
Quoted 127 lines · Randolph Sapp
Quoted 123 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
There are some unobvious issues with adding PVR support to Mesa via a bbappend:
1. We need to mark mesa package as machine-specific, due to differences in builds between SGX, Rogue and software-rendering
2. We also need to then mark mesa package as providing safe ABIs (EGL/GLES/GBM) in order for all generic dependent packages to not be treated as machine-specific, allowing their re-use across different machines of the same architecture
But doing the above alters the upstream mesa package and changes its signatures even when not building for TI platforms, which is a Yocto Project compliance violation.
In order to resolve this issue, convert Mesa bbappend, that adds PVR support, into its own standalone alternative provider, called mesa-pvr and allow selecting it with
PREFERRED_PROVIDERsettings.Signed-off-by Denys Dmytriyenko <[email protected]>--- meta-ti-bsp/conf/layer.conf | 2 +- meta-ti-bsp/conf/machine/beagleplay.conf | 1 + meta-ti-bsp/conf/machine/include/am62xx.inc | 1 + meta-ti-bsp/conf/machine/include/am65xx.inc | 1 + meta-ti-bsp/conf/machine/include/j721e.inc | 1 + meta-ti-bsp/conf/machine/include/j721s2.inc | 1 + meta-ti-bsp/conf/machine/include/j784s4.inc | 1 + meta-ti-bsp/conf/machine/include/mesa-pvr.inc | 8 ++++++++ meta-ti-bsp/conf/machine/include/omap-a15.inc | 1 + meta-ti-bsp/conf/machine/include/ti33x.inc | 1 + meta-ti-bsp/conf/machine/include/ti43x.inc | 1 + .../recipes-graphics/mesa/mesa-gl_23.%.bbappend | 1 - .../mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} | 10 ++++++---- meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappend | 1 - 14 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 meta-ti-bsp/conf/machine/include/mesa-pvr.inc delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_23.%.bbappend rename meta-ti-bsp/recipes-graphics/mesa/{pvr-mesa.inc => mesa-pvr_22.3.5.bb} (88%) delete mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_23.%.bbappendmeta-ti-bsp/conf/layer.conf +1
-1@@ -19,7 +19,7 @@ LAYERDEPENDS_meta-ti-bsp = " \ " SIGGEN_EXCLUDERECIPES_ABISAFE += " \ - mesa \ + mesa-pvr \ " HOSTTOOLS_NONFATAL += "truncate xxd comm"meta-ti-bsp/conf/machine/beagleplay.conf +1
-0@@ -10,6 +10,7 @@ MACHINE_FEATURES += "screen gpu" SERIAL_CONSOLES = "115200;ttyS2" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "lite"meta-ti-bsp/conf/machine/include/am62xx.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am62xx" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # Default tiboot3.bin on AM62x is for HS-FSmeta-ti-bsp/conf/machine/include/am65xx.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":am65xx" MACHINE_FEATURES += "screen touchscreen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "" KERNEL_DEVICETREE_PREFIX = "ti/k3-am654"meta-ti-bsp/conf/machine/include/j721e.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721e" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fwmeta-ti-bsp/conf/machine/include/j721s2.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j721s2" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "generic"meta-ti-bsp/conf/machine/include/j784s4.inc +1
-0@@ -3,6 +3,7 @@ SOC_FAMILY:append = ":j784s4" MACHINE_FEATURES += "screen gpu" +require conf/machine/include/mesa-pvr.inc PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver" TFA_BOARD = "j784s4"meta-ti-bsp/conf/machine/include/mesa-pvr.inc new file +8
-0@@ -0,0 +1,8 @@ +PREFERRED_PROVIDER_virtual/mesa ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/egl ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles3 ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgbm ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libglx ?= "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgl ?= "mesa-pvr"[snip]
Quoted 4 lines
I'm concerned a potential version drift between mesa-native packages and mesa-target packages in this configuration, but otherwise this doesn't appear to cause any issues with target packages or dependency chains at the moment.
I have also successfully tested with these extra 2 lines:
PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-pvr-native" PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa-pvr"
We can add them back into conf/machine/include/mesa-pvr.inc
Signature · 1 line
Denys