diff options
author | Randolph Sapp <rs@ti.com> | 2023-01-30 17:20:05 -0600 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2023-02-16 13:31:05 -0600 |
commit | 15417ca726f75881a2c51c08d258ea923803cbb9 (patch) | |
tree | 8ba9ef844b0dda04b7d2273f43b4502ffbddaf04 /meta-ti-bsp/recipes-graphics | |
parent | 248bea1c505e2f401a8521bc7edf3bf314b237bd (diff) | |
download | meta-ti-15417ca726f75881a2c51c08d258ea923803cbb9.tar.gz |
meta-ti-bsp: graphics: Resolve dependency chain
Patched mesa will now be configured based on what virtual/gpudriver
preferred provider is selected. The gpu drivers will now runtime
recommend the associated um components.
Signed-off-by: Randolph Sapp <rs@ti.com>
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-graphics')
6 files changed, 84 insertions, 98 deletions
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 @@ | |||
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://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f" | ||
5 | |||
6 | inherit features_check | ||
7 | |||
8 | REQUIRED_MACHINE_FEATURES = "gpu" | ||
9 | |||
10 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
11 | COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx" | ||
12 | |||
13 | PR = "r2" | ||
14 | |||
15 | BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize" | ||
16 | |||
17 | SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}" | ||
18 | SRCREV = "5977e82b96028f783d39c7219f016c1faf8dc5f5" | ||
19 | |||
20 | TARGET_PRODUCT:j721e = "j721e_linux" | ||
21 | TARGET_PRODUCT:j721s2 = "j721s2_linux" | ||
22 | TARGET_PRODUCT:j784s4 = "j784s4_linux" | ||
23 | TARGET_PRODUCT:am62xx = "am62_linux" | ||
24 | PVR_BUILD ?= "release" | ||
25 | PVR_WS = "wayland" | ||
26 | |||
27 | INITSCRIPT_NAME = "rc.pvr" | ||
28 | INITSCRIPT_PARAMS = "defaults 8" | ||
29 | |||
30 | inherit update-rc.d | ||
31 | |||
32 | PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" | ||
33 | |||
34 | DEPENDS += "libdrm wayland expat" | ||
35 | RDEPENDS:${PN} += "bash" | ||
36 | RDEPENDS:${PN} += "wayland expat" | ||
37 | |||
38 | RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm" | ||
39 | RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" | ||
40 | RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg" | ||
41 | |||
42 | RREPLACES:${PN} = "libegl libgles1 liblges2 libgbm" | ||
43 | RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" | ||
44 | RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg" | ||
45 | |||
46 | RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm" | ||
47 | RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" | ||
48 | RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg" | ||
49 | |||
50 | RRECOMMENDS:${PN} += "ti-img-rogue-driver" | ||
51 | |||
52 | S = "${WORKDIR}/git" | ||
53 | |||
54 | do_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 | |||
59 | FILES:${PN} += " ${nonarch_base_libdir}/firmware/" | ||
60 | FILES:${PN} += " ${datadir}/" | ||
61 | |||
62 | PACKAGES =+ "${PN}-plugins" | ||
63 | FILES:${PN}-plugins = "${libdir}/libGLESv2.so ${libdir}/libGLESv1_CM.so ${libdir}/libEGL.so ${libdir}/dri/pvr_dri.so" | ||
64 | RDEPENDS:${PN} += "${PN}-plugins" | ||
65 | |||
66 | ALLOW_EMPTY:${PN}-plugins = "1" | ||
67 | |||
68 | INSANE_SKIP:${PN} += "ldflags arch already-stripped" | ||
69 | INSANE_SKIP:${PN}-plugins = "dev-so" | ||
70 | |||
71 | CLEANBROKEN = "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 @@ | |||
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/k5.10/${PV}" | ||
14 | SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}" | ||
15 | SRCREV = "51e598919641d51156a631efa5447124a3c0f543" | ||
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} += "mesa-megadriver libdrm ti-img-rogue-driver" | ||
26 | |||
27 | do_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 | |||
34 | PACKAGES = "${PN}-tools ${PN}" | ||
35 | FILES:${PN}-tools = "${bindir}/" | ||
36 | RDEPENDS:${PN}-tools = "python3-core" | ||
37 | RRECOMMENDS:${PN} += "${PN}-tools" | ||
38 | |||
39 | INSANE_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" | |||
3 | LICENSE = "TI-TSPA" | 3 | LICENSE = "TI-TSPA" |
4 | LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8" | 4 | LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8" |
5 | 5 | ||
6 | inherit features_check | ||
7 | |||
8 | REQUIRED_MACHINE_FEATURES = "gpu" | ||
9 | |||
10 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 6 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
11 | COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx" | 7 | COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx" |
12 | 8 | ||
13 | PR = "r38" | 9 | PR = "r38" |
14 | 10 | ||
15 | BRANCH = "ti-img-sgx/kirkstone/${PV}" | 11 | BRANCH = "ti-img-sgx/kirkstone-mesa/${PV}" |
16 | 12 | ||
17 | SRC_URI = " \ | 13 | SRC_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 | " |
21 | SRCREV = "905809029b877fea42e91b9738825a6294ff1775" | 17 | SRCREV = "bbae7217051341f515515ec190e165119102f45a" |
22 | 18 | ||
23 | TARGET_PRODUCT:ti33x = "ti335x" | 19 | TARGET_PRODUCT:ti33x = "ti335x" |
24 | TARGET_PRODUCT:ti43x = "ti437x" | 20 | TARGET_PRODUCT:ti43x = "ti437x" |
@@ -33,26 +29,7 @@ inherit update-rc.d | |||
33 | PACKAGECONFIG ??= "udev" | 29 | PACKAGECONFIG ??= "udev" |
34 | PACKAGECONFIG[udev] = ",,,udev" | 30 | PACKAGECONFIG[udev] = ",,,udev" |
35 | 31 | ||
36 | PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" | 32 | RDEPENDS:${PN} += "libdrm libdrm-omap" |
37 | |||
38 | DEPENDS += "libdrm udev wayland wayland-protocols libffi expat" | ||
39 | DEPENDS:append:libc-musl = " gcompat" | ||
40 | RDEPENDS:${PN} += "libdrm libdrm-omap udev wayland wayland-protocols libffi expat" | ||
41 | |||
42 | RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm" | ||
43 | RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" | ||
44 | RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg" | ||
45 | |||
46 | RREPLACES:${PN} = "libegl libgles1 libgles2 libgbm" | ||
47 | RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" | ||
48 | RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg" | ||
49 | |||
50 | RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm" | ||
51 | RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev" | ||
52 | RCONFLICTS:${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 | ||
55 | RPROVIDES:${PN} += "libGLESv2.so.1" | ||
56 | 33 | ||
57 | RRECOMMENDS:${PN} += "ti-sgx-ddk-km" | 34 | RRECOMMENDS:${PN} += "ti-sgx-ddk-km" |
58 | 35 | ||
@@ -60,7 +37,6 @@ S = "${WORKDIR}/git" | |||
60 | 37 | ||
61 | do_install () { | 38 | do_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 | |||
5 | BRANCH = "powervr/kirkstone/22.0" | ||
6 | |||
7 | SRC_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 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | SRCREV = "44b82a7b6fa8a86243911b1b0d6a07b0fd8ecfba" | ||
20 | |||
21 | PACKAGECONFIG: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 | |||
26 | PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss" | ||
27 | PACKAGECONFIG[pvr] = "-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," | ||
28 | PACKAGECONFIG[sgx] = "-Dgallium-sgx-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}," | ||
29 | |||
30 | PV:append = "+pvr" | ||
31 | |||
32 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}" | ||
33 | GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}" | ||
34 | |||
35 | do_install:append () { | ||
36 | # remove pvr custom pkgconfig | ||
37 | rm -rf ${D}${datadir}/pkgconfig | ||
38 | } | ||
39 | |||
40 | RRECOMMENDS:mesa-megadriver:class-target:append = "${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}" | ||