diff options
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.bb | 141 |
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 @@ | |||
1 | DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs" | ||
2 | HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs" | ||
3 | LICENSE = "TI-TFL" | ||
4 | LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" | ||
5 | |||
6 | inherit bin_package | ||
7 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx" | ||
10 | |||
11 | PR = "r2" | ||
12 | |||
13 | BRANCH = "linuxws/kirkstone/k6.1/${PV}" | ||
14 | SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}" | ||
15 | SRCREV = "d0543929cc6fe53959a64c60285896e2c14ed314" | ||
16 | S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}" | ||
17 | |||
18 | TARGET_PRODUCT:j721e = "j721e_linux" | ||
19 | TARGET_PRODUCT:j721s2 = "j721s2_linux" | ||
20 | TARGET_PRODUCT:j784s4 = "j784s4_linux" | ||
21 | TARGET_PRODUCT:am62xx = "am62_linux" | ||
22 | PVR_BUILD = "release" | ||
23 | PVR_WS = "lws-generic" | ||
24 | |||
25 | RDEPENDS:${PN} = " \ | ||
26 | libdrm \ | ||
27 | ti-img-rogue-driver \ | ||
28 | ${PN}-firmware \ | ||
29 | " | ||
30 | |||
31 | PACKAGECONFIG ?= " \ | ||
32 | ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan x11 wayland', 'vulkan', '', d)} \ | ||
33 | ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \ | ||
34 | " | ||
35 | |||
36 | PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}" | ||
37 | PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}" | ||
38 | PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}" | ||
39 | |||
40 | def 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 | |||
52 | do_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 | |||
78 | GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue" | ||
79 | VULKAN_PACKAGES = "libvk-rogue" | ||
80 | OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools" | ||
81 | |||
82 | PACKAGES = " \ | ||
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 | ||
94 | python __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 | ||
113 | FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*" | ||
114 | FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*" | ||
115 | RDEPENDS:libgles1-rogue += "mesa-megadriver" | ||
116 | RDEPENDS:libgles2-rogue += "mesa-megadriver" | ||
117 | |||
118 | # vulkan specific shared objects and configs | ||
119 | FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan" | ||
120 | RDEPENDS:libvk-rogue += "vulkan-loader libx11-xcb wayland libdrm" | ||
121 | |||
122 | # opencl specific shared objects and configs | ||
123 | FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL" | ||
124 | RDEPENDS:libopencl-rogue += "opencl-icd-loader" | ||
125 | RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools" | ||
126 | FILES:libopencl-rogue-tools += "${bindir}/ocl*" | ||
127 | DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1" | ||
128 | |||
129 | # optional tools and tests | ||
130 | FILES:${PN}-tools = "${bindir}/" | ||
131 | RDEPENDS:${PN}-tools = "python3-core ${PN}" | ||
132 | |||
133 | # required firmware | ||
134 | FILES:${PN}-firmware = "${base_libdir}/firmware/*" | ||
135 | INSANE_SKIP:${PN}-firmware += "arch" | ||
136 | |||
137 | RRECOMMENDS:${PN} += " \ | ||
138 | ${PN}-tools \ | ||
139 | " | ||
140 | |||
141 | INSANE_SKIP:${PN} += "already-stripped dev-so" | ||