summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2015-12-01 17:35:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-12 23:42:52 +0000
commitfccb12818a8bacdb59101ce5142af4caa4b2640a (patch)
tree6dc22d0eb124214f4b9ad6c4eec0f24509efd84b /meta
parenta1fa8d9ac53625737aab29b4e5e1687fc01bdfc2 (diff)
downloadpoky-fccb12818a8bacdb59101ce5142af4caa4b2640a.tar.gz
weston-init: add a native systemd unit file
Previously weston was started by systemd via a classic init script [YOCTO #5582] (From OE-Core rev: e67c7f0998a5a285bd079d2c956bd61457e75077) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/wayland/weston-init.bb13
-rw-r--r--meta/recipes-graphics/wayland/weston-init/weston.service15
2 files changed, 25 insertions, 3 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index fc2e4f80ee..653541e3c8 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,17 +1,22 @@
1SUMMARY = "Startup script for the Weston Wayland compositor" 1SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
2LICENSE = "MIT" 2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" 3LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
4 4
5SRC_URI = "file://init" 5SRC_URI = "file://init \
6 file://weston.service"
6 7
7S = "${WORKDIR}" 8S = "${WORKDIR}"
8 9
9do_install() { 10do_install() {
10 install -d ${D}/${sysconfdir}/init.d 11 install -d ${D}/${sysconfdir}/init.d
11 install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston 12 install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
13
14 install -d ${D}${systemd_system_unitdir}
15 install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
12} 16}
13 17
14inherit allarch update-rc.d distro_features_check 18inherit allarch update-rc.d distro_features_check systemd
19
15# rdepends on weston which depends on virtual/egl 20# rdepends on weston which depends on virtual/egl
16REQUIRED_DISTRO_FEATURES = "opengl" 21REQUIRED_DISTRO_FEATURES = "opengl"
17 22
@@ -19,3 +24,5 @@ RDEPENDS_${PN} = "weston kbd"
19 24
20INITSCRIPT_NAME = "weston" 25INITSCRIPT_NAME = "weston"
21INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." 26INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
27
28SYSTEMD_SERVICE_${PN} = "weston.service"
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
new file mode 100644
index 0000000000..4f1f7ff102
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -0,0 +1,15 @@
1[Unit]
2Description=Weston Wayland compositor startup
3RequiresMountsFor=/run
4
5[Service]
6User=root
7EnvironmentFile=-/etc/default/weston
8Environment="XDG_RUNTIME_DIR=/run/user/root"
9ExecStartPre=/bin/mkdir -p /run/user/root
10ExecStartPre=/bin/chmod 0700 /run/user/root
11ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
12
13[Install]
14WantedBy=multi-user.target
15