aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen2/recipes-graphics
diff options
context:
space:
mode:
authorRonan <ronan.lemartret@iot.bzh>2016-10-21 11:47:04 +0200
committerRonan <ronan.lemartret@iot.bzh>2016-10-28 10:38:32 +0200
commit53c3b9f24914241a127529b452fc35fb00339631 (patch)
treec53dfeb4ff1bb2b9134aad5752a0c462112f3944 /meta-rcar-gen2/recipes-graphics
parentf54635ba5cb8e905c12d0904cfa225ecf3d2beb4 (diff)
rc.pvr become a systemd service
Change-Id: Ie58d65d312e9d00f5d3ba295034924954d9141f7 Signed-off-by: Ronan <ronan.lemartret@iot.bzh>
Diffstat (limited to 'meta-rcar-gen2/recipes-graphics')
-rw-r--r--meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb18
-rw-r--r--meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service18
2 files changed, 31 insertions, 5 deletions
diff --git a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
index bc4dc4c..8a72b12 100644
--- a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
+++ b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
@@ -46,6 +46,13 @@ SRC_URI_append_r8a7794 = " ${@base_contains("DISTRO_FEATURES", "wayland", " \
file://EGL_headers_for_wayland.patch \
", "", d)}"
+SRC_URI_append = " file://rc.pvr.service "
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "rc.pvr.service"
+
do_populate_lic[noexec] = "1"
do_compile[noexec] = "1"
@@ -53,7 +60,8 @@ do_install() {
# Copy binary into sysroot
cp -r ${S}/etc ${D}
cp -r ${S}/usr ${D}
-
+ mv ${D}/etc/init.d/rc.pvr ${D}/usr/local/bin/
+
# Create a symbolic link for compatibility with various software
ln -s libGLESv2.so ${D}/usr/lib/libGLESv2.so.2
@@ -70,6 +78,10 @@ do_install() {
${D}/${sysconfdir}/powervr.ini
fi
fi
+ # Install systemd unit files
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -m 644 -p -D ${WORKDIR}/rc.pvr.service ${D}${systemd_system_unitdir}/rc.pvr.service
+ fi
}
PACKAGES = "\
@@ -87,8 +99,6 @@ FILES_${PN}-dev = " \
${includedir}/* \
"
-inherit update-rc.d
-
PROVIDES = "virtual/libgles2"
PROVIDES_append = "${@base_contains("DISTRO_FEATURES", "wayland", "", " virtual/egl", d)}"
RPROVIDES_${PN} += "${GLES}-user-module libgles2-mesa libgles2-mesa-dev libgles2 libgles2-dev"
@@ -96,5 +106,3 @@ INSANE_SKIP_${PN} += "ldflags already-stripped"
INSANE_SKIP_${PN}-dev += "ldflags"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
PRIVATE_LIBS_${PN} = "libEGL.so.1"
-INITSCRIPT_NAME = "rc.pvr"
-INITSCRIPT_PARAMS = "start 8 5 2 . stop 61 0 1 6 ."
diff --git a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service
new file mode 100644
index 0000000..5aec697
--- /dev/null
+++ b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service
@@ -0,0 +1,18 @@
+
+[Unit]
+SourcePath=/usr/local/bin/rc.pvr
+Before=weston.service
+
+[Service]
+Type=forking
+Restart=no
+TimeoutSec=5min
+IgnoreSIGPIPE=no
+KillMode=process
+GuessMainPID=no
+RemainAfterExit=yes
+ExecStart=/usr/local/bin/rc.pvr start
+ExecStop=/usr/local/bin/rc.pvr stop
+
+[Install]
+RequiredBy=weston.service