diff options
author | Khem Raj <raj.khem@gmail.com> | 2019-09-16 15:35:02 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-09-19 15:27:02 +0100 |
commit | b418ececee2c22f334cc31f70aff71ba9571b431 (patch) | |
tree | 75c9e22de9d5ecd6f9211c2a7ff675707f14eed3 /meta/recipes-graphics/wayland/weston-init.bb | |
parent | 9c22a5a8a8dd0d5645adeb937ca3ffc8d1c6f6ec (diff) | |
download | poky-b418ececee2c22f334cc31f70aff71ba9571b431.tar.gz |
weston-init: Add possibility to run weston as non-root user
These changes are from meta-96boards primarily
Launch the session via a udev rule based on what kind of display device
is available
delete weston-conf and move the fuctionality into weston-init other
layers are doing same
weston-init installs machine specific weston.ini therefore mark is
machine specific now
(From OE-Core rev: aa3bced2e1de2f4ba507aa014835b06edccc138a)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/wayland/weston-init.bb')
-rw-r--r-- | meta/recipes-graphics/wayland/weston-init.bb | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb index 22ba5f3fb3..8b6689717c 100644 --- a/meta/recipes-graphics/wayland/weston-init.bb +++ b/meta/recipes-graphics/wayland/weston-init.bb | |||
@@ -2,23 +2,35 @@ SUMMARY = "Startup script and systemd unit file for the Weston Wayland composito | |||
2 | LICENSE = "MIT" | 2 | LICENSE = "MIT" |
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
4 | 4 | ||
5 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
6 | |||
5 | SRC_URI = "file://init \ | 7 | SRC_URI = "file://init \ |
6 | file://weston.service \ | 8 | file://weston.ini \ |
9 | file://weston@.service \ | ||
10 | file://71-weston-drm.rules \ | ||
7 | file://weston-start" | 11 | file://weston-start" |
8 | 12 | ||
9 | S = "${WORKDIR}" | 13 | S = "${WORKDIR}" |
10 | 14 | ||
11 | do_install() { | 15 | do_install() { |
12 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston | 16 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston |
13 | install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service | 17 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini |
14 | 18 | ||
19 | # Install Weston systemd service and accompanying udev rule | ||
20 | install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service | ||
21 | sed -i -e s:/etc:${sysconfdir}:g \ | ||
22 | -e s:/usr/bin:${bindir}:g \ | ||
23 | -e s:/var:${localstatedir}:g \ | ||
24 | ${D}${systemd_unitdir}/system/weston@.service | ||
25 | install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \ | ||
26 | ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules | ||
15 | # Install weston-start script | 27 | # Install weston-start script |
16 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start | 28 | install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start |
17 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start | 29 | sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start |
18 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start | 30 | sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start |
19 | } | 31 | } |
20 | 32 | ||
21 | inherit allarch update-rc.d distro_features_check systemd | 33 | inherit update-rc.d distro_features_check systemd |
22 | 34 | ||
23 | # rdepends on weston which depends on virtual/egl | 35 | # rdepends on weston which depends on virtual/egl |
24 | REQUIRED_DISTRO_FEATURES = "opengl" | 36 | REQUIRED_DISTRO_FEATURES = "opengl" |
@@ -28,4 +40,10 @@ RDEPENDS_${PN} = "weston kbd" | |||
28 | INITSCRIPT_NAME = "weston" | 40 | INITSCRIPT_NAME = "weston" |
29 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." | 41 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." |
30 | 42 | ||
31 | SYSTEMD_SERVICE_${PN} = "weston.service" | 43 | FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service" |
44 | |||
45 | CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini" | ||
46 | |||
47 | SYSTEMD_SERVICE_${PN} = "weston@%i.service" | ||
48 | SYSTEMD_AUTO_ENABLE = "disable" | ||
49 | |||