summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-graphics/gles-module
diff options
context:
space:
mode:
authorTakamitsu Honda <takamitsu.honda.pv@renesas.com>2017-01-27 11:47:06 +0900
committerTakamitsu Honda <takamitsu.honda.pv@renesas.com>2017-01-27 11:47:06 +0900
commit3613b2780a6b5d5d70ea6802be5060a8214cbdb5 (patch)
treefab60ccb7b38da7e8558a2879885f06e5b0662d2 /meta-rcar-gen3/recipes-graphics/gles-module
Renesas BSP v3.5.1 (kernel v4.9 stable) [Environment] poky: yocto-2.1.2 (cca8dd15c8096626052f6d8d25ff1e9a606104a3) meta-openembedded: 55c8a76da5dc099a7bc3838495c672140cedb78e meta-linaro: 2f51d38048599d9878f149d6d15539fb97603f8f [Information] - U-boot: Changed load address from H'49000000 to H'50000000 - XDG_RUNTIME_DIR has been changed from "/run/user/root" to "/run/user/0" - Change location of include directory, which stores common user header files, to $(INCSHARED) - In BSP Only, core-image-weston is not supported even though local-wayland.conf is provided. - Please set Salvator-x SW7 Pin-1. In after Yocto BSP v2.12.0, it is  necessary to enable BKUP_TRG signal for Suspend to RAM. - The dtb filename was changed in R-Car H3. Only "Image-r8a7795-es1-salvator-x.dtb" is supported in this version. Please use "Image-r8a7795-es1-salvator-x.dtb" It supports R-Car H3 WS1.0 and WS1.1. - Please update your local.conf and bblayers.conf corresponding to Yocto v2.16.0 package. You can refer to meta-rcargen3/docs/sample/conf/ for updated contents. - You have to re-compile out-of-recipe software like user application by v2.16.0 SDK toolchains. - In some boards, the resuming from System Suspend to RAM may cause unstable operation or failed to resume. Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
Diffstat (limited to 'meta-rcar-gen3/recipes-graphics/gles-module')
-rw-r--r--meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb126
-rw-r--r--meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/0001-EGL-eglext.h-Include-eglmesaext.h-to-avoid-compile-error.patch25
-rw-r--r--meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch8
-rw-r--r--meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service11
4 files changed, 170 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb
new file mode 100644
index 0000000..939c61b
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module.bb
@@ -0,0 +1,126 @@
+require include/gles-control.inc
+
+DESCRIPTION = "PowerVR GPU user module"
+LICENSE = "CLOSED"
+
+PN = "gles-user-module"
+PR = "r0"
+
+COMPATIBLE_MACHINE = "(r8a7795|r8a7796)"
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+S = "${WORKDIR}/rogue"
+GLES = "gsx"
+
+SRC_URI_r8a7795 = "file://r8a7795_linux_gsx_binaries_gles3.tar.bz2"
+SRC_URI_r8a7796 = "file://r8a7796_linux_gsx_binaries_gles3.tar.bz2"
+SRC_URI_append = " \
+ file://change-shell.patch \
+ file://0001-EGL-eglext.h-Include-eglmesaext.h-to-avoid-compile-error.patch \
+ file://rc.pvr.service \
+"
+
+inherit update-rc.d systemd
+
+INITSCRIPT_NAME = "rc.pvr"
+INITSCRIPT_PARAMS = "start 7 5 2 . stop 62 0 1 6 ."
+SYSTEMD_SERVICE_${PN} = "rc.pvr.service"
+
+do_populate_lic[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+ # Install configuration files
+ install -d ${D}/${sysconfdir}/init.d
+ install -m 644 ${S}/${sysconfdir}/powervr.ini ${D}/${sysconfdir}
+ install -m 755 ${S}/${sysconfdir}/init.d/rc.pvr ${D}/${sysconfdir}/init.d/
+ install -d ${D}/${sysconfdir}/udev/rules.d
+ install -m 644 ${S}/${sysconfdir}/udev/rules.d/72-pvr-seat.rules ${D}/${sysconfdir}/udev/rules.d/
+
+ # Install header files
+ install -d ${D}/${includedir}/EGL
+ install -m 644 ${S}/${includedir}/EGL/*.h ${D}/${includedir}/EGL/
+ install -d ${D}/${includedir}/GLES2
+ install -m 644 ${S}/${includedir}/GLES2/*.h ${D}/${includedir}/GLES2/
+ install -d ${D}/${includedir}/GLES3
+ install -m 644 ${S}/${includedir}/GLES3/*.h ${D}/${includedir}/GLES3/
+ install -d ${D}/${includedir}/KHR
+ install -m 644 ${S}/${includedir}/KHR/khrplatform.h ${D}/${includedir}/KHR/khrplatform.h
+
+ # Install pre-builded binaries
+ install -d ${D}/${libdir}
+ install -m 755 ${S}/${libdir}/*.so ${D}/${libdir}/
+ install -d ${D}/${exec_prefix}/local/bin
+ install -m 755 ${S}/${exec_prefix}/local/bin/dlcsrv_REL ${D}/${exec_prefix}/local/bin/dlcsrv_REL
+ install -d ${D}/lib/firmware
+ install -m 644 ${S}/lib/firmware/rgx.fw ${D}/lib/firmware/
+
+ # Install pkgconfig
+ install -d ${D}/${libdir}/pkgconfig
+ install -m 644 ${S}/${libdir}/pkgconfig/*.pc ${D}/${libdir}/pkgconfig/
+
+ # Create symbolic link
+ cd ${D}/${libdir}
+ ln -s libEGL.so libEGL.so.1
+ ln -s libGLESv2.so libGLESv2.so.2
+
+ if [ "${USE_GLES_WAYLAND}" = "1" ]; then
+ # Set the "WindowSystem" parameter for wayland
+ if [ "${GLES}" = "gsx" ]; then
+ sed -i -e "s/WindowSystem=libpvrDRM_WSEGL.so/WindowSystem=libpvrWAYLAND_WSEGL.so/g" \
+ ${D}/${sysconfdir}/powervr.ini
+ fi
+ fi
+
+ # Install systemd service
+ if [ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)} ]; then
+ install -d ${D}/${systemd_system_unitdir}/
+ install -m 644 ${WORKDIR}/rc.pvr.service ${D}/${systemd_system_unitdir}/
+ fi
+}
+
+PACKAGES = "\
+ ${PN} \
+ ${PN}-dev \
+"
+
+FILES_${PN} = " \
+ ${sysconfdir}/* \
+ ${libdir}/* \
+ /lib/firmware/rgx.fw \
+ /usr/local/bin/* \
+"
+
+FILES_${PN}-dev = " \
+ ${includedir}/* \
+ ${libdir}/pkgconfig/* \
+"
+
+PROVIDES = "virtual/libgles2 virtual/egl"
+RPROVIDES_${PN} += " \
+ ${GLES}-user-module \
+ libgles2-mesa \
+ libgles2-mesa-dev \
+ libgles2 \
+ libgles2-dev \
+ libegl \
+ libegl1 \
+"
+
+RDEPENDS_${PN} = " \
+ kernel-module-gles \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \
+"
+
+INSANE_SKIP_${PN} = "ldflags build-deps file-rdeps"
+INSANE_SKIP_${PN}-dev = "ldflags build-deps file-rdeps"
+INSANE_SKIP_${PN} += "arch"
+INSANE_SKIP_${PN}-dev += "arch"
+INSANE_SKIP_${PN}-dbg = "arch"
+
+# Skip debug strip of do_populate_sysroot()
+INHIBIT_SYSROOT_STRIP = "1"
+
+# Skip debug split and strip of do_package()
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
diff --git a/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/0001-EGL-eglext.h-Include-eglmesaext.h-to-avoid-compile-error.patch b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/0001-EGL-eglext.h-Include-eglmesaext.h-to-avoid-compile-error.patch
new file mode 100644
index 0000000..b8fde11
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/0001-EGL-eglext.h-Include-eglmesaext.h-to-avoid-compile-error.patch
@@ -0,0 +1,25 @@
+From b1e6a6ea447e01af0a31dfba44510aea23f2ffa8 Mon Sep 17 00:00:00 2001
+From: Tomohiro Komagata <tomohiro.komagata.aj@renesas.com>
+Date: Thu, 17 Nov 2016 14:41:05 +0900
+Subject: [PATCH] EGL: eglext.h: Include eglmesaext.h to avoid compile error
+
+---
+ usr/include/EGL/eglext.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/usr/include/EGL/eglext.h b/usr/include/EGL/eglext.h
+index de119f6..243da4a 100644
+--- a/usr/include/EGL/eglext.h
++++ b/usr/include/EGL/eglext.h
+@@ -645,6 +645,8 @@ EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
+ #endif /* KHRONOS_SUPPORT_INT64 */
+ #endif /* EGL_NV_system_time */
+
++#include <EGL/eglmesaext.h>
++
+ #ifdef __cplusplus
+ }
+ #endif
+--
+1.9.1
+
diff --git a/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch
new file mode 100644
index 0000000..1dd22f4
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/change-shell.patch
@@ -0,0 +1,8 @@
+--- a/etc/init.d/rc.pvr 2014-08-01 09:56:47.528824893 +0900
++++ b/etc/init.d/rc.pvr 2014-08-01 09:56:55.744827677 +0900
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ ############################################################################ ###
+ #@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
+ #@License Strictly Confidential.
diff --git a/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service
new file mode 100644
index 0000000..fa7ad7b
--- /dev/null
+++ b/meta-rcar-gen3/recipes-graphics/gles-module/gles-user-module/rc.pvr.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=PowerVR consumer services
+
+[Service]
+ExecStart=/etc/init.d/rc.pvr start
+ExecStop=/etc/init.d/rc.pvr stop
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target