weston: Set XDG_RUNTIME_DIR for Raspberry Pi 91/6591/2
authorLeon Anavi <leon.anavi@konsulko.com>
Thu, 22 Sep 2016 13:29:09 +0000 (16:29 +0300)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Mon, 26 Sep 2016 02:03:08 +0000 (02:03 +0000)
Set environment variable XDG_RUNTIME_DIR and fix
Weston on Raspberry Pi 2/3 through script
/etc/profile.d/weston.sh.

Change-Id: Ie561623641f287e1ec911a5813c2cff225af4977
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston/weston.sh [new file with mode: 0644]
meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston_%.bbappend

diff --git a/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston/weston.sh b/meta-agl-bsp/meta-raspberrypi/recipes-graphics/wayland/weston/weston.sh
new file mode 100644 (file)
index 0000000..7d62eff
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if test -z "$XDG_RUNTIME_DIR"; then
+    export XDG_RUNTIME_DIR=/var/run/user/root
+    mkdir --parents $XDG_RUNTIME_DIR
+    chmod 0700 $XDG_RUNTIME_DIR
+fi
index 43f1da5..7c81679 100644 (file)
@@ -2,14 +2,19 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
 
 SRC_URI_append = "\
     file://weston-raspberrypi.ini \
+    file://weston.sh \
     "
 
 do_install_append() {
     WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
     install -d ${D}${WESTON_INI_CONFIG}
     install -m 0644 ${WORKDIR}/weston-raspberrypi.ini ${D}${WESTON_INI_CONFIG}/weston.ini
+
+    install -d ${D}/${sysconfdir}/profile.d
+    install -m 0755 ${WORKDIR}/weston.sh ${D}/${sysconfdir}/profile.d/weston.sh
 }
 
 FILES_${PN} += " \
     ${sysconfdir}/xdg/weston/weston.ini \
+    ${sysconfdir}/profile.d/weston.sh \
     "