From: Neena Busireddy <[email protected]> Xwayland needs to be started with virtual terminal so weston-launch is used.
Signed-off-by: Neena Busireddy <[email protected]> Signed-off-by: Tom Hochstein <[email protected]> --- recipes-graphics/wayland/weston-init.bbappend | 13 +++++ .../wayland/weston-init/weston-launch-init | 58 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 recipes-graphics/wayland/weston-init.bbappend create mode 100644 recipes-graphics/wayland/weston-init/weston-launch-init diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 0000000..6473727 --- /dev/null +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_mx6 = " file://weston-launch-init" + +USE_WESTON_LAUNCH = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" + +do_install_append() { + + if [ "${USE_WESTON_LAUNCH}" = "yes" ]; then + install -d ${D}/${sysconfdir}/init.d + install -m755 ${WORKDIR}/weston-launch-init ${D}/${sysconfdir}/init.d/weston + fi +} diff --git a/recipes-graphics/wayland/weston-init/weston-launch-init b/recipes-graphics/wayland/weston-init/weston-launch-init new file mode 100644 index 0000000..9063c72 --- /dev/null +++ b/recipes-graphics/wayland/weston-init/weston-launch-init @@ -0,0 +1,58 @@ +#!/bin/sh +# +### BEGIN INIT INFO +# Provides: weston +# Required-Start: $local_fs $remote_fs +# Required-Stop: $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +killproc() { + pid=`/bin/pidof $1` + [ "$pid" != "" ] && kill $pid +} + +read CMDLINE < /proc/cmdline +for x in $CMDLINE; do + case $x in + weston=false) + echo "Weston disabled" + exit 0; + ;; + esac +done + +case "$1" in + start) + . /etc/profile + + # This is all a nasty hack + if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/root + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR + fi + mkdir -p /tmp/.X11-unix + export XDG_CONFIG_HOME=/etc + rm /var/log/weston.log + openvt -v -- weston-launch -- --log=/var/log/weston.log + ;; + + stop) + echo "Stopping Weston" + killproc weston + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 -- 2.1.4 -- _______________________________________________ meta-freescale mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-freescale
