diff options
author | Randolph Sapp <rs@ti.com> | 2024-05-02 14:18:41 -0500 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2024-05-02 15:01:10 -0500 |
commit | 817a950947bf8ed2ce97036f121592e5b906bedf (patch) | |
tree | 8f3edda1c485c66c4ee5f1fe9a0430e94f9717e7 | |
parent | c293c5188195f7f16bfe93e27fd2c27f12c60ade (diff) | |
download | meta-ti-817a950947bf8ed2ce97036f121592e5b906bedf.tar.gz |
ti-img-rogue-*: add ddk 24.1 recipes for ltsprep
Recipes for DDK 24.1, but lock them behind ltsprep tags because they
require device tree changes that do not work on the current default
kernel for this layer.
Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
-rw-r--r-- | meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb | 44 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb | 148 |
2 files changed, 192 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb new file mode 100644 index 00000000..a1b76d27 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_24.1.6554834.bb | |||
@@ -0,0 +1,44 @@ | |||
1 | DESCRIPTION = "Kernel drivers for the PowerVR Rogue GPU found in the TI SoCs" | ||
2 | HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver" | ||
3 | LICENSE = "MIT | GPL-2.0-only" | ||
4 | LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2" | ||
5 | |||
6 | DEFAULT_PREFERENCE = "-1" | ||
7 | |||
8 | inherit module | ||
9 | |||
10 | PROVIDES = "virtual/gpudriver" | ||
11 | |||
12 | MACHINE_KERNEL_PR:append = "b" | ||
13 | PR = "${MACHINE_KERNEL_PR}" | ||
14 | |||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
16 | |||
17 | COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s" | ||
18 | |||
19 | DEPENDS = "virtual/kernel" | ||
20 | |||
21 | BRANCH = "linuxws/scarthgap/k6.6/${PV}" | ||
22 | |||
23 | SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}" | ||
24 | |||
25 | S = "${WORKDIR}/git" | ||
26 | |||
27 | SRCREV = "e2dfdfee991dadc18175f27fe9e8676e910a2f8d" | ||
28 | |||
29 | TARGET_PRODUCT:j721e = "j721e_linux" | ||
30 | TARGET_PRODUCT:j721s2 = "j721s2_linux" | ||
31 | TARGET_PRODUCT:j784s4 = "j784s4_linux" | ||
32 | TARGET_PRODUCT:am62xx = "am62_linux" | ||
33 | TARGET_PRODUCT:am62pxx = "am62p_linux" | ||
34 | TARGET_PRODUCT:j722s = "j722s_linux" | ||
35 | PVR_BUILD = "release" | ||
36 | PVR_WS = "lws-generic" | ||
37 | |||
38 | EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}' | ||
39 | |||
40 | do_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 | ||
42 | } | ||
43 | |||
44 | RRECOMMENDS:${PN} += "ti-img-rogue-umlibs" | ||
diff --git a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb new file mode 100644 index 00000000..d43d1635 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_24.1.6554834.bb | |||
@@ -0,0 +1,148 @@ | |||
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 | DEFAULT_PREFERENCE = "-1" | ||
7 | |||
8 | inherit bin_package | ||
9 | |||
10 | INHIBIT_DEFAULT_DEPS = "" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx|am62pxx|j722s" | ||
14 | |||
15 | PR = "r3" | ||
16 | |||
17 | BRANCH = "linuxws/scarthgap/k6.6/${PV}" | ||
18 | SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}" | ||
19 | SRCREV = "e473234158c736248cf71a60080b7faf76fca561" | ||
20 | S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}" | ||
21 | |||
22 | TARGET_PRODUCT:j721e = "j721e_linux" | ||
23 | TARGET_PRODUCT:j721s2 = "j721s2_linux" | ||
24 | TARGET_PRODUCT:j784s4 = "j784s4_linux" | ||
25 | TARGET_PRODUCT:am62xx = "am62_linux" | ||
26 | TARGET_PRODUCT:am62pxx = "am62p_linux" | ||
27 | TARGET_PRODUCT:j722s = "j722s_linux" | ||
28 | PVR_BUILD = "release" | ||
29 | PVR_WS = "lws-generic" | ||
30 | |||
31 | RDEPENDS:${PN} = " \ | ||
32 | libdrm \ | ||
33 | ti-img-rogue-driver \ | ||
34 | ${PN}-firmware \ | ||
35 | " | ||
36 | |||
37 | PACKAGECONFIG ?= " \ | ||
38 | ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan wayland', 'vulkan', '', d)} \ | ||
39 | ${@bb.utils.filter('DISTRO_FEATURES', 'opengl opencl', d)} \ | ||
40 | " | ||
41 | |||
42 | PACKAGECONFIG[opengl] = ",,,,${GLES_PACKAGES}" | ||
43 | PACKAGECONFIG[vulkan] = ",,,,${VULKAN_PACKAGES}" | ||
44 | PACKAGECONFIG[opencl] = ",,,,${OPENCL_PACKAGES}" | ||
45 | |||
46 | def get_file_list(package_list_var, d): | ||
47 | file_list = [] | ||
48 | package_list = d.getVar(package_list_var) | ||
49 | prefix = f"{d.getVar('S')}/" | ||
50 | if package_list: | ||
51 | for package in package_list.split(): | ||
52 | package_file_string = d.getVar(f"FILES:{package}") | ||
53 | if package_file_string: | ||
54 | for package_file in package_file_string.split(): | ||
55 | file_list.append(f"{prefix}{package_file}") | ||
56 | return " ".join(file_list) | ||
57 | |||
58 | do_install:prepend() { | ||
59 | if ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'false', 'true', d)}; then | ||
60 | for file in ${@get_file_list('GLES_PACKAGES', d)}; do | ||
61 | rm -rf ${file} | ||
62 | done | ||
63 | fi | ||
64 | if ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', 'false', 'true', d)}; then | ||
65 | for file in ${@get_file_list('VULKAN_PACKAGES', d)}; do | ||
66 | rm -rf ${file} | ||
67 | done | ||
68 | fi | ||
69 | if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'false', 'true', d)}; then | ||
70 | for file in ${@get_file_list('OPENCL_PACKAGES', d)}; do | ||
71 | rm -rf ${file} | ||
72 | done | ||
73 | fi | ||
74 | if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then | ||
75 | if [ -e ${S}/lib/firmware ]; then | ||
76 | mv ${S}/lib/firmware ${S}${nonarch_base_libdir} | ||
77 | fi | ||
78 | fi | ||
79 | |||
80 | # clean up any empty directories | ||
81 | find "${S}" -empty -type d -delete | ||
82 | } | ||
83 | |||
84 | GLES_PACKAGES = "libgles1-rogue libgles2-rogue libgles3-rogue" | ||
85 | VULKAN_PACKAGES = "libvk-rogue" | ||
86 | OPENCL_PACKAGES = "libopencl-rogue libopencl-rogue-tools" | ||
87 | |||
88 | PACKAGES = " \ | ||
89 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', d.getVar('GLES_PACKAGES'), '', d)} \ | ||
90 | ${@bb.utils.contains('PACKAGECONFIG', 'vulkan', d.getVar('VULKAN_PACKAGES'), '', d)} \ | ||
91 | ${@bb.utils.contains('PACKAGECONFIG', 'opencl', d.getVar('OPENCL_PACKAGES'), '', d)} \ | ||
92 | ${PN}-tools \ | ||
93 | ${PN}-firmware \ | ||
94 | ${PN} \ | ||
95 | " | ||
96 | |||
97 | # Inject variables so that packages don't get Debian-renamed (which would | ||
98 | # remove the -rogue suffix), but don't RPROVIDEs/RCONFLICTs on the generic | ||
99 | # libgl name to prevent colliding with swrast libs | ||
100 | python __anonymous() { | ||
101 | suffix = "" | ||
102 | if "-native" in d.getVar("PN"): | ||
103 | suffix = "-native" | ||
104 | for p in (("vulkan", "libvk",), | ||
105 | ("gles", "libgles1", "libglesv1-cm1"), | ||
106 | ("gles", "libgles2", "libglesv2-2"), | ||
107 | ("gles", "libgles3",), | ||
108 | ("opencl", "libopencl",)): | ||
109 | mlprefix = d.getVar("MLPREFIX") | ||
110 | fullp = mlprefix + p[1] + "-rogue" + suffix | ||
111 | mlprefix = d.getVar("MLPREFIX") | ||
112 | pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:]) | ||
113 | d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") | ||
114 | d.setVar("INSANE_SKIP:" + fullp, "dev-so ldflags") | ||
115 | d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}ti-img-rogue-umlibs" + suffix) | ||
116 | } | ||
117 | |||
118 | # gles specific shared objects | ||
119 | FILES:libgles1-rogue = "${libdir}/libGLESv1*.so*" | ||
120 | FILES:libgles2-rogue = "${libdir}/libGLESv2*.so*" | ||
121 | RDEPENDS:libgles1-rogue += "mesa-megadriver" | ||
122 | RDEPENDS:libgles2-rogue += "mesa-megadriver" | ||
123 | |||
124 | # vulkan specific shared objects and configs | ||
125 | FILES:libvk-rogue = "${libdir}/libVK_IMG.so* ${datadir}/vulkan" | ||
126 | RDEPENDS:libvk-rogue += "vulkan-loader wayland libdrm" | ||
127 | |||
128 | # opencl specific shared objects and configs | ||
129 | FILES:libopencl-rogue = "${libdir}/libPVROCL.so* ${sysconfdir}/OpenCL" | ||
130 | RDEPENDS:libopencl-rogue += "opencl-icd-loader" | ||
131 | RRECOMMENDS:libopencl-rogue += "libopencl-rogue-tools" | ||
132 | FILES:libopencl-rogue-tools += "${bindir}/ocl*" | ||
133 | DEBIAN_NOAUTONAME:libopencl-rogue-tools = "1" | ||
134 | |||
135 | # optional tools and tests | ||
136 | FILES:${PN}-tools = "${bindir}/" | ||
137 | RDEPENDS:${PN}-tools = "python3-core libdrm ${PN}" | ||
138 | INSANE_SKIP:${PN}-tools = "ldflags" | ||
139 | |||
140 | # required firmware | ||
141 | FILES:${PN}-firmware = "${base_libdir}/firmware/*" | ||
142 | INSANE_SKIP:${PN}-firmware += "arch" | ||
143 | |||
144 | RRECOMMENDS:${PN} += " \ | ||
145 | ${PN}-tools \ | ||
146 | " | ||
147 | |||
148 | INSANE_SKIP:${PN} += "already-stripped dev-so ldflags" | ||