summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch29
-rw-r--r--meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb (renamed from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb)20
-rw-r--r--meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb8
-rw-r--r--meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb71
-rw-r--r--meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb39
-rw-r--r--meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb30
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend1
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend1
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc40
9 files changed, 97 insertions, 142 deletions
diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
deleted file mode 100644
index f021cc39..00000000
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 80d32fee3d768abbd77cce77ea9a7574651460a9 Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denis@denix.org>
3Date: Wed, 7 Jul 2021 13:11:56 -0400
4Subject: [PATCH] compiler: support OpenEmbedded "nodistro" internal aarch64
5 toolchain
6
7Upstream-Status: Pending
8
9Signed-off-by: Denys Dmytriyenko <denis@denix.org>
10---
11 build/linux/config/compiler.mk | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/build/linux/config/compiler.mk b/build/linux/config/compiler.mk
15index 53a0bef..d788579 100644
16--- a/build/linux/config/compiler.mk
17+++ b/build/linux/config/compiler.mk
18@@ -65,7 +65,7 @@ define calculate-compiler-preferred-target
19 ifneq ($$(filter i386-% i486-% i586-% i686-%,$$($(1)_compiler_preferred_target)),)
20 $(1)_compiler_preferred_target := i386-linux-gnu
21 endif
22- ifneq ($$(filter aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
23+ ifneq ($$(filter aarch64-oe-linux aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
24 $(1)_compiler_preferred_target := aarch64-linux-gnu
25 endif
26 ifneq ($$(filter armv7a-cros-linux-gnueabi armv7l-tizen-linux-gnueabi,$$($(1)_compiler_preferred_target)),)
27--
282.7.4
29
diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
index b4d19195..96fb7484 100644
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb
+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
@@ -3,40 +3,38 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
3LICENSE = "MIT | GPL-2.0-only" 3LICENSE = "MIT | GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2" 4LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
5 5
6inherit module features_check 6inherit module
7 7
8REQUIRED_MACHINE_FEATURES = "gpu" 8PROVIDES = "virtual/gpudriver"
9 9
10MACHINE_KERNEL_PR:append = "b" 10MACHINE_KERNEL_PR:append = "b"
11PR = "${MACHINE_KERNEL_PR}" 11PR = "${MACHINE_KERNEL_PR}"
12 12
13PACKAGE_ARCH = "${MACHINE_ARCH}" 13PACKAGE_ARCH = "${MACHINE_ARCH}"
14
14COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx" 15COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
15 16
16DEPENDS = "virtual/kernel" 17DEPENDS = "virtual/kernel"
17 18
18PROVIDES = "virtual/gpudriver" 19BRANCH = "linuxws/kirkstone/k5.10/${PV}"
19 20
20BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize" 21SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}"
21
22SRC_URI = " \
23 git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH} \
24 file://0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch \
25"
26 22
27S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
28 24
29SRCREV = "c901804e8221d477983a6f7224a9cdc6e832f050" 25SRCREV = "d575e4f64c95a3534e10e85da15bd303febf133f"
30 26
31TARGET_PRODUCT:j721e = "j721e_linux" 27TARGET_PRODUCT:j721e = "j721e_linux"
32TARGET_PRODUCT:j721s2 = "j721s2_linux" 28TARGET_PRODUCT:j721s2 = "j721s2_linux"
33TARGET_PRODUCT:j784s4 = "j784s4_linux" 29TARGET_PRODUCT:j784s4 = "j784s4_linux"
34TARGET_PRODUCT:am62xx = "am62_linux" 30TARGET_PRODUCT:am62xx = "am62_linux"
35PVR_BUILD = "release" 31PVR_BUILD = "release"
36PVR_WS = "wayland" 32PVR_WS = "lws-generic"
37 33
38EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}' 34EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}'
39 35
40do_install() { 36do_install() {
41 make -C ${STAGING_KERNEL_DIR} M=${B}/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install 37 make -C ${STAGING_KERNEL_DIR} M=${B}/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
42} 38}
39
40RRECOMMENDS:${PN} += "ti-img-rogue-umlibs"
diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
index c22e3096..13b8757c 100644
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
@@ -3,9 +3,9 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-linux"
3LICENSE = "MIT | GPL-2.0-only" 3LICENSE = "MIT | GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9b8e5edbce66c2747c50fcef12" 4LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9b8e5edbce66c2747c50fcef12"
5 5
6inherit module features_check 6inherit module
7 7
8REQUIRED_MACHINE_FEATURES = "gpu" 8PROVIDES = "virtual/gpudriver"
9 9
10COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|k3" 10COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|k3"
11 11
@@ -16,8 +16,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
16 16
17DEPENDS = "virtual/kernel" 17DEPENDS = "virtual/kernel"
18 18
19PROVIDES = "virtual/gpudriver"
20
21BRANCH = "ti-img-sgx/${PV}/k5.10" 19BRANCH = "ti-img-sgx/${PV}/k5.10"
22 20
23SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}" 21SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}"
@@ -44,3 +42,5 @@ do_install() {
44do_install:k3() { 42do_install:k3() {
45 make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install 43 make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
46} 44}
45
46RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
deleted file mode 100644
index a665c614..00000000
--- a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
+++ /dev/null
@@ -1,71 +0,0 @@
1DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
2HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
3LICENSE = "TI-TFL"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
5
6inherit features_check
7
8REQUIRED_MACHINE_FEATURES = "gpu"
9
10PACKAGE_ARCH = "${MACHINE_ARCH}"
11COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
12
13PR = "r2"
14
15BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize"
16
17SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
18SRCREV = "5977e82b96028f783d39c7219f016c1faf8dc5f5"
19
20TARGET_PRODUCT:j721e = "j721e_linux"
21TARGET_PRODUCT:j721s2 = "j721s2_linux"
22TARGET_PRODUCT:j784s4 = "j784s4_linux"
23TARGET_PRODUCT:am62xx = "am62_linux"
24PVR_BUILD ?= "release"
25PVR_WS = "wayland"
26
27INITSCRIPT_NAME = "rc.pvr"
28INITSCRIPT_PARAMS = "defaults 8"
29
30inherit update-rc.d
31
32PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm"
33
34DEPENDS += "libdrm wayland expat"
35RDEPENDS:${PN} += "bash"
36RDEPENDS:${PN} += "wayland expat"
37
38RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm"
39RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
40RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
41
42RREPLACES:${PN} = "libegl libgles1 liblges2 libgbm"
43RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
44RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
45
46RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm"
47RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
48RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
49
50RRECOMMENDS:${PN} += "ti-img-rogue-driver"
51
52S = "${WORKDIR}/git"
53
54do_install () {
55 oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} BUILD=${PVR_BUILD} WINDOW_SYSTEM=${PVR_WS}
56 chown -R root:root ${D}
57}
58
59FILES:${PN} += " ${nonarch_base_libdir}/firmware/"
60FILES:${PN} += " ${datadir}/"
61
62PACKAGES =+ "${PN}-plugins"
63FILES:${PN}-plugins = "${libdir}/libGLESv2.so ${libdir}/libGLESv1_CM.so ${libdir}/libEGL.so ${libdir}/dri/pvr_dri.so"
64RDEPENDS:${PN} += "${PN}-plugins"
65
66ALLOW_EMPTY:${PN}-plugins = "1"
67
68INSANE_SKIP:${PN} += "ldflags arch already-stripped"
69INSANE_SKIP:${PN}-plugins = "dev-so"
70
71CLEANBROKEN = "1"
diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
new file mode 100644
index 00000000..924e46ba
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
@@ -0,0 +1,39 @@
1DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
2HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
3LICENSE = "TI-TFL"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
5
6inherit bin_package
7
8PACKAGE_ARCH = "${MACHINE_ARCH}"
9COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
10
11PR = "r2"
12
13BRANCH = "linuxws/kirkstone/k5.10/${PV}"
14SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
15SRCREV = "51e598919641d51156a631efa5447124a3c0f543"
16S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
17
18TARGET_PRODUCT:j721e = "j721e_linux"
19TARGET_PRODUCT:j721s2 = "j721s2_linux"
20TARGET_PRODUCT:j784s4 = "j784s4_linux"
21TARGET_PRODUCT:am62xx = "am62_linux"
22PVR_BUILD = "release"
23PVR_WS = "lws-generic"
24
25RDEPENDS:${PN} += "mesa-megadriver libdrm ti-img-rogue-driver"
26
27do_install:append() {
28 rm -rf "${D}/etc/init.d"
29 rm -rf "${D}/usr/lib/libvulkan.so"
30 rm -rf "${D}/usr/lib/libvulkan.so.0"
31 rm -rf "${D}/usr/lib/libvulkan.so.1"
32}
33
34PACKAGES = "${PN}-tools ${PN}"
35FILES:${PN}-tools = "${bindir}/"
36RDEPENDS:${PN}-tools = "python3-core"
37RRECOMMENDS:${PN} += "${PN}-tools"
38
39INSANE_SKIP:${PN} += "ldflags arch already-stripped dev-so"
diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
index 1c479ee0..f1fbed15 100644
--- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
+++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
@@ -3,22 +3,18 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux"
3LICENSE = "TI-TSPA" 3LICENSE = "TI-TSPA"
4LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8" 4LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8"
5 5
6inherit features_check
7
8REQUIRED_MACHINE_FEATURES = "gpu"
9
10PACKAGE_ARCH = "${MACHINE_ARCH}" 6PACKAGE_ARCH = "${MACHINE_ARCH}"
11COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx" 7COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
12 8
13PR = "r38" 9PR = "r38"
14 10
15BRANCH = "ti-img-sgx/kirkstone/${PV}" 11BRANCH = "ti-img-sgx/kirkstone-mesa/${PV}"
16 12
17SRC_URI = " \ 13SRC_URI = " \
18 git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \ 14 git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \
19 file://pvrsrvkm.rules \ 15 file://pvrsrvkm.rules \
20" 16"
21SRCREV = "905809029b877fea42e91b9738825a6294ff1775" 17SRCREV = "bbae7217051341f515515ec190e165119102f45a"
22 18
23TARGET_PRODUCT:ti33x = "ti335x" 19TARGET_PRODUCT:ti33x = "ti335x"
24TARGET_PRODUCT:ti43x = "ti437x" 20TARGET_PRODUCT:ti43x = "ti437x"
@@ -33,26 +29,7 @@ inherit update-rc.d
33PACKAGECONFIG ??= "udev" 29PACKAGECONFIG ??= "udev"
34PACKAGECONFIG[udev] = ",,,udev" 30PACKAGECONFIG[udev] = ",,,udev"
35 31
36PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" 32RDEPENDS:${PN} += "libdrm libdrm-omap"
37
38DEPENDS += "libdrm udev wayland wayland-protocols libffi expat"
39DEPENDS:append:libc-musl = " gcompat"
40RDEPENDS:${PN} += "libdrm libdrm-omap udev wayland wayland-protocols libffi expat"
41
42RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm"
43RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
44RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
45
46RREPLACES:${PN} = "libegl libgles1 libgles2 libgbm"
47RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
48RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
49
50RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm"
51RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
52RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
53
54# The actual SONAME is libGLESv2.so.2, so need to explicitly specify RPROVIDES for .so.1 here
55RPROVIDES:${PN} += "libGLESv2.so.1"
56 33
57RRECOMMENDS:${PN} += "ti-sgx-ddk-km" 34RRECOMMENDS:${PN} += "ti-sgx-ddk-km"
58 35
@@ -60,7 +37,6 @@ S = "${WORKDIR}/git"
60 37
61do_install () { 38do_install () {
62 oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} 39 oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT}
63 ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1
64 40
65 without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)} 41 without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}
66 with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)} 42 with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)}
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
new file mode 100644
index 00000000..912e9e9d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
new file mode 100644
index 00000000..912e9e9d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
diff --git a/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
new file mode 100644
index 00000000..17edee8d
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
@@ -0,0 +1,40 @@
1# PowerVR Graphics require several patches that have not made their way
2# upstream yet. This allows us to build the shims we need without completely
3# clobbering mesa.
4
5BRANCH = "powervr/kirkstone/22.0"
6
7SRC_URI = " \
8 git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
9 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
10 file://0002-meson.build-make-TLS-ELF-optional.patch \
11 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
12 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
13 file://0001-util-format-Check-for-NEON-before-using-it.patch \
14 file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
15"
16
17S = "${WORKDIR}/git"
18
19SRCREV = "44b82a7b6fa8a86243911b1b0d6a07b0fd8ecfba"
20
21PACKAGECONFIG:append = " \
22 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
23 ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \
24"
25
26PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss"
27PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
28PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS},"
29
30PV:append = "+pvr"
31
32GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
33GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
34
35do_install:append () {
36 # remove pvr custom pkgconfig
37 rm -rf ${D}${datadir}/pkgconfig
38}
39
40RRECOMMENDS:mesa-megadriver:class-target:append = "${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"