]> code.ossystems Code Review - meta-freescale.git/commitdiff
mesa-etnaviv-env: Add a recipe to set environment variables for mesa/entaviv
authorAndreas Müller <schnitzeltony@gmail.com>
Tue, 6 Apr 2021 07:20:51 +0000 (09:20 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 20 Apr 2021 15:10:12 +0000 (12:10 -0300)
* we have several options to start an x-session. To not touch all, set
  environment variables globally
* Inspired by [1]

[1] https://gitlab.freedesktop.org/mesa/mesa/-/issues/3721

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.conf [new file with mode: 0644]
recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb [new file with mode: 0644]

diff --git a/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.conf b/recipes-graphics/mesa/mesa-etnaviv-env/mesa-etnaviv.conf
new file mode 100644 (file)
index 0000000..db4f874
--- /dev/null
@@ -0,0 +1,3 @@
+[Manager]
+DefaultEnvironment=MESA_GL_VERSION_OVERRIDE=2.1 ETNA_MESA_DEBUG=nir
+
diff --git a/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb b/recipes-graphics/mesa/mesa-etnaviv-env_0.1.bb
new file mode 100644 (file)
index 0000000..13cdf02
--- /dev/null
@@ -0,0 +1,24 @@
+SUMMARY = "Mesa environment variables for etnaviv on xserver"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI = "file://mesa-etnaviv.conf"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+    # MESA global envirronment variables
+
+    # systemd
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -D -m 644 ${WORKDIR}/mesa-etnaviv.conf \
+            ${D}${sysconfdir}/systemd/system.conf.d/mesa-etnaviv.conf
+    fi
+
+    # sysvinit - TODO
+}
+
+ALLOW_EMPTY_${PN} = "1"