summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.2.6460340.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.2.6460340.bb')
-rw-r--r--meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.2.6460340.bb141
1 files changed, 141 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.2.6460340.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.2.6460340.bb
new file mode 100644
index 00000000..121c4cc5
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.2.6460340.bb
@@ -0,0 +1,141 @@
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/k6.1/${PV}"
14SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
15SRCREV = "d0543929cc6fe53959a64c60285896e2c14ed314"
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} = " \
26 libdrm \
27 ti-img-rogue-driver \
28 ${PN}-firmware \
29"
30
31PACKAGECONFIG ?= " \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan x11 wayland', 'vulkan', '', d)} \
33 ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \
34"
35
36PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}"
37PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}"
38PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}"
39
40def get_file_list(package_list_var, d):
41 file_list = []
42 package_list = d.getVar(package_list_var)
43 prefix = f"{d.getVar('S')}/"
44 if package_list:
45 for package in package_list.split():
46 package_file_string = d.getVar(f"FILES:{package}")
47 if package_file_string:
48 for package_file in package_file_string.split():
49 file_list.append(f"{prefix}{package_file}")
50 return " ".join(file_list)
51
52do_install:prepend() {
53 if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then
54 for file in ${@get_file_list('GLES_PACKAGES', d)}; do
55 rm -rf ${file}
56 done
57 fi
58 if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then
59 for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do
60 rm -rf ${file}
61 done
62 fi
63 if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then
64 for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do
65 rm -rf ${file}
66 done
67 fi
68 if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
69 if [ -e ${S}/lib/firmware ]; then
70 mv ${S}/lib/firmware ${S}${nonarch_base_libdir}
71 fi
72 fi
73
74 # clean up any empty directories
75 find "${S}" -empty -type d -delete
76}
77
78GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue"
79VULKAN_PACKAGES = "libvk-rogue"
80OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools"
81
82PACKAGES = " \
83 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', d.getVar('GLES_PACKAGES'), '', d)} \
84 ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', d.getVar('VULKAN_PACKAGES'), '', d)} \
85 ${@bb.utils.contains('PACKAGECONFIG', 'opencl', d.getVar('OPENCL_PACKAGES'), '', d)} \
86 ${PN}-tools \
87 ${PN}-firmware \
88 ${PN} \
89"
90
91# Inject variables so that packages don't get Debian-renamed (which would
92# remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic
93# libgl name to prevent colliding with swrast libs
94python __anonymous() {
95 suffix = ""
96 if "-native" in d.getVar("PN"):
97 suffix = "-native"
98 for p in (("vulkan", "libvk",),
99 ("gles", "libgles1", "libglesv1-cm1"),
100 ("gles", "libgles2", "libglesv2-2"),
101 ("gles", "libgles3",),
102 ("opencl", "libopencl",)):
103 mlprefix = d.getVar("MLPREFIX")
104 fullp = mlprefix + p[1] + "-rogue" + suffix
105 mlprefix = d.getVar("MLPREFIX")
106 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
107 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
108 d.setVar("INSANE_SKIP:" + fullp, "dev-so")
109 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix)
110}
111
112# gles specific shared objects
113FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*"
114FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*"
115RDEPENDS:libgles1-rogue += "mesa-megadriver"
116RDEPENDS:libgles2-rogue += "mesa-megadriver"
117
118# vulkan specific shared objects and configs
119FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan"
120RDEPENDS:libvk-rogue += "vulkan-loader libx11-xcb wayland libdrm"
121
122# opencl specific shared objects and configs
123FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL"
124RDEPENDS:libopencl-rogue += "opencl-icd-loader"
125RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools"
126FILES:libopencl-rogue-tools += "${bindir}/ocl*"
127DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1"
128
129# optional tools and tests
130FILES:${PN}-tools = "${bindir}/"
131RDEPENDS:${PN}-tools = "python3-core ${PN}"
132
133# required firmware
134FILES:${PN}-firmware = "${base_libdir}/firmware/*"
135INSANE_SKIP:${PN}-firmware += "arch"
136
137RRECOMMENDS:${PN} += " \
138 ${PN}-tools \
139"
140
141INSANE_SKIP:${PN} += "already-stripped dev-so"