From 53c3b9f24914241a127529b452fc35fb00339631 Mon Sep 17 00:00:00 2001 From: Ronan Date: Fri, 21 Oct 2016 11:47:04 +0200 Subject: rc.pvr become a systemd service Change-Id: Ie58d65d312e9d00f5d3ba295034924954d9141f7 Signed-off-by: Ronan --- .../recipes-graphics/gles-module/gles-user-module.bb | 18 +++++++++++++----- .../gles-module/gles-user-module/rc.pvr.service | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module/rc.pvr.service (limited to 'meta-rcar-gen2') 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 -- cgit 1.2.3-korg