weston: Set XDG_RUNTIME_DIR for qcom 57/8557/3
authorKotaro Hashimoto <Hashimoto.Kotaro@ds.MitsubishiElectric.co.jp>
Thu, 23 Feb 2017 12:25:27 +0000 (21:25 +0900)
committerKotaro Hashimoto <Hashimoto.Kotaro@ds.MitsubishiElectric.co.jp>
Fri, 24 Feb 2017 03:10:29 +0000 (03:10 +0000)
Without this environment variable, Weston fails to start on Dragonboard

 * backport from master commit 0a34b88c4b661a91962dd0c04c3af7e582bafcbd

Change-Id: I67ad6ec7cb2ad4cdcf0885e42d0b297d87ec43d3
Signed-off-by: Kotaro Hashimoto <Hashimoto.Kotaro@ds.MitsubishiElectric.co.jp>
meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston/weston-qcom.ini [new file with mode: 0644]
meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston/weston.sh [new file with mode: 0644]
meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston_%.bbappend [new file with mode: 0644]

diff --git a/meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston/weston-qcom.ini b/meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston/weston-qcom.ini
new file mode 100644 (file)
index 0000000..3daad91
--- /dev/null
@@ -0,0 +1,13 @@
+[core]
+backend=drm-backend.so
+shell=ivi-shell.so
+
+[ivi-shell]
+ivi-module=ivi-controller.so,wl-shell-emulator.so
+ivi-input-module=ivi-input-controller.so
+
+[output]
+name=HDMI-A-1
+transform=270
+# Uncomment for 1080p on GeChic 1502i:
+#mode=173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
diff --git a/meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston/weston.sh b/meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston/weston.sh
new file mode 100644 (file)
index 0000000..225a034
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if test -z "$XDG_RUNTIME_DIR"; then
+    export XDG_RUNTIME_DIR=/run/user/$UID
+    mkdir --parents $XDG_RUNTIME_DIR
+    chmod 0700 $XDG_RUNTIME_DIR
+fi
diff --git a/meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston_%.bbappend b/meta-agl-bsp/meta-qcom/recipes-graphics/wayland/weston_%.bbappend
new file mode 100644 (file)
index 0000000..8fff1df
--- /dev/null
@@ -0,0 +1,20 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
+SRC_URI_append = "\
+    file://weston-qcom.ini \
+    file://weston.sh \
+    "
+
+do_install_append() {
+    WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
+    install -d ${D}${WESTON_INI_CONFIG}
+    install -m 0644 ${WORKDIR}/weston-qcom.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 \
+    "