From 6c50f608063f673f8763d2baebf1c486cb5ed63a Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Mon, 25 Jun 2018 21:11:45 -0500 Subject: weston-init: Fix inoperable Weston desktop For an image configured with pam and systemd, Weston apps would fail to run. For example: $ weston-terminal failed to connect to Wayland display: No such file or directory failed to create display: No such file or directory This fix is based on a proposal by Daniel Diaz to OE-core. The main part of the fix is the use of a new, manually created tty. The original proposal called weston directly, but that didn't seem to work where weston-launch did. Signed-off-by: Tom Hochstein Signed-off-by: Otavio Salvador --- recipes-graphics/wayland/weston-init.bbappend | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'recipes-graphics/wayland/weston-init.bbappend') diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index ce1482d94..76aadf948 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -1,5 +1,25 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + # OpenGL is not required for parts with GPU support for 2D but not 3D IMX_REQUIRED_DISTRO_FEATURES_REMOVE = "" IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl" IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = "" REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" + +SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file://weston.config', '', d)}" + +HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" +HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" + +do_install_append() { + if ${HAS_SYSTEMD}; then + sed -i \ + -e 's,/usr/bin,${bindir},g' \ + -e 's,/etc,${sysconfdir},g' \ + -e 's,/var,${localstatedir},g' \ + ${D}${systemd_system_unitdir}/weston.service + if ${HAS_XWAYLAND}; then + install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston + fi + fi +} -- cgit v1.2.3-54-g00ecf