diff options
author | 2017-04-12 14:07:33 +0200 | |
---|---|---|
committer | 2017-04-19 11:18:50 +0000 | |
commit | 029de35a172da31b083b86d93a79d787773dec11 (patch) | |
tree | d49ead563efec4f599900dd4abfca4c4dd14476a /meta-agl/recipes-graphics | |
parent | 473b4354758ea6657fd196c30fb14332b5e7178d (diff) |
Use weston-init to startup weston
* weston.service should not be a part of weston recipes
* remove weston.service from AGL weston recipes
* yocto upstream uses the recipe weston-init to startup weston
* customize weston-start with sed
- remove openvt
- add option to weston-launch
* customize weston.service with sed
- add option for weston
* unified the weston startup beteween AGL BSPs
* remove fix on the AGL BSP
Bug-AGL: SPEC-452
Bug-AGL: SPEC-310
Change-Id: I12722826abdc004214d289961e900c36528ec6e3
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'meta-agl/recipes-graphics')
4 files changed, 21 insertions, 25 deletions
diff --git a/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb b/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb index c3863cb43..fb7af0a45 100644 --- a/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb +++ b/meta-agl/recipes-graphics/packagegroups/packagegroup-agl-image-weston.bb @@ -9,7 +9,7 @@ PACKAGES = "\ ALLOW_EMPTY_${PN} = "1" -RDEPENDS_${PN} += "weston weston-ini-conf weston-examples" +RDEPENDS_${PN} += "weston weston-init weston-ini-conf weston-examples" RDEPENDS_${PN} += "\ packagegroup-agl-image-minimal \ diff --git a/meta-agl/recipes-graphics/wayland/weston-init.bbappend b/meta-agl/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 000000000..9b0f434e5 --- /dev/null +++ b/meta-agl/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1,20 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +WESTONTTY ??= "1" +WESTONUSER ??= "root" +WESTONARGS ?= "--idle-time=4294967" +WESTONLAUNCHARGS ??= "--tty /dev/tty${WESTONTTY} --user ${WESTONUSER}" + +do_install_append() { + sed -e 's,launcher="weston-launch.*--",launcher="weston-launch ${WESTONLAUNCHARGS} --",g' \ + -e 's,exec openvt $openvt_args --,exec ,g' \ + -i ${D}${bindir}/weston-start + + sed -e 's,User=root,User=${WESTONUSER},g' \ + -e 's,$OPTARGS,${WESTONARGS} $OPTARGS,g' \ + -i ${D}${systemd_system_unitdir}/weston.service + + sed -i "/\[Unit\]/aConflicts=getty@tty${WESTONTTY}.service" \ + ${D}${systemd_system_unitdir}/weston.service +} + diff --git a/meta-agl/recipes-graphics/wayland/weston/weston.service b/meta-agl/recipes-graphics/wayland/weston/weston.service deleted file mode 100644 index afd8a7db8..000000000 --- a/meta-agl/recipes-graphics/wayland/weston/weston.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Weston reference Wayland compositor -Conflicts=getty@tty1.service -After=dbus.service - -[Service] -ExecStart=/usr/bin/weston-launch --tty /dev/tty1 --user root -- --idle-time=4294967 -ExecStop=/usr/bin/killall -s KILL weston -Type=simple - -[Install] -WantedBy=multi-user.target diff --git a/meta-agl/recipes-graphics/wayland/weston_%.bbappend b/meta-agl/recipes-graphics/wayland/weston_%.bbappend index 217c4fc0b..dc984c1d1 100644 --- a/meta-agl/recipes-graphics/wayland/weston_%.bbappend +++ b/meta-agl/recipes-graphics/wayland/weston_%.bbappend @@ -2,17 +2,5 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" SRC_URI_append = "\ file://0001-compositor-drm.c-Launch-without-input-devices.patch \ - file://weston.service \ " -inherit systemd - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "weston.service" - -do_install_append() { - # Install systemd unit files - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -m 644 -p -D ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service - fi -} |