From 3613b2780a6b5d5d70ea6802be5060a8214cbdb5 Mon Sep 17 00:00:00 2001 From: Takamitsu Honda Date: Fri, 27 Jan 2017 11:47:06 +0900 Subject: First commit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renesas BSP v3.5.1 (kernel v4.9 stable) [Environment] poky: yocto-2.1.2 (cca8dd15c8096626052f6d8d25ff1e9a606104a3) meta-openembedded: 55c8a76da5dc099a7bc3838495c672140cedb78e meta-linaro: 2f51d38048599d9878f149d6d15539fb97603f8f [Information] - U-boot: Changed load address from H'49000000 to H'50000000 - XDG_RUNTIME_DIR has been changed from "/run/user/root" to "/run/user/0" - Change location of include directory, which stores common user header files, to $(INCSHARED) - In BSP Only, core-image-weston is not supported even though local-wayland.conf is provided. - Please set Salvator-x SW7 Pin-1. In after Yocto BSP v2.12.0, it is  necessary to enable BKUP_TRG signal for Suspend to RAM. - The dtb filename was changed in R-Car H3. Only "Image-r8a7795-es1-salvator-x.dtb" is supported in this version. Please use "Image-r8a7795-es1-salvator-x.dtb" It supports R-Car H3 WS1.0 and WS1.1. - Please update your local.conf and bblayers.conf corresponding to Yocto v2.16.0 package. You can refer to meta-rcargen3/docs/sample/conf/ for updated contents. - You have to re-compile out-of-recipe software like user application by v2.16.0 SDK toolchains. - In some boards, the resuming from System Suspend to RAM may cause unstable operation or failed to resume. Signed-off-by: Takamitsu Honda --- .../recipes-graphics/wayland/weston-init/init | 53 ++++++++++++++++ .../wayland/weston-init/weston-start | 74 ++++++++++++++++++++++ .../wayland/weston-init/weston.service | 11 ++++ 3 files changed, 138 insertions(+) create mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston-init/init create mode 100755 meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start create mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.service (limited to 'meta-rcar-gen3/recipes-graphics/wayland/weston-init') diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston-init/init b/meta-rcar-gen3/recipes-graphics/wayland/weston-init/init new file mode 100644 index 0000000..d3e87c6 --- /dev/null +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston-init/init @@ -0,0 +1,53 @@ +#!/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 + +if test -e /etc/default/weston ; then + . /etc/default/weston +fi + +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 + + weston-start -- $OPTARGS + ;; + + stop) + echo "Stopping Weston" + killproc weston + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "usage: $0 { start | stop | restart }" + ;; +esac + +exit 0 diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start b/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start new file mode 100755 index 0000000..4657513 --- /dev/null +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start @@ -0,0 +1,74 @@ +#!/bin/sh +# Copyright (C) 2016 O.S. Systems Software LTDA. +# Copyright (C) 2016 Freescale Semiconductor + +export PATH="/sbin:/usr/sbin:/bin:/usr/bin" + +usage() { + cat < -- +EOF +} + +## Module support +modules_dir=@DATADIR@/weston-start + +# Add weston extra argument +add_weston_argument() { + weston_args="$weston_args $1" +} + +# Add openvt extra argument +add_openvt_argument() { + openvt_args="$openvt_args $1" +} + +if test $# -lt 2; then + usage + exit 1 +fi + +if [ -n "$WAYLAND_DISPLAY" ]; then + echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet." + exit 1 +fi +if [ -n "$DISPLAY" ]; then + launcher="weston" +else + launcher="weston-launch -u root --" +fi + +openvt_args="-s" +while [ -n "$1" ]; do + if [ "$1" = "--" ]; then + shift + break + fi + openvt_args="$openvt_args $1" + shift +done + +weston_args=$* + +# Load and run modules +if [ -d "$modules_dir" ]; then + for m in "$modules_dir"/*; do + # Skip backup files + if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then + continue + fi + + # process module + . $m + done +fi + +if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/`id -u` + if ! test -d "$XDG_RUNTIME_DIR"; then + mkdir --parents $XDG_RUNTIME_DIR + chmod 0700 $XDG_RUNTIME_DIR + fi +fi + +exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.service b/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.service new file mode 100644 index 0000000..295ffd7 --- /dev/null +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.service @@ -0,0 +1,11 @@ +[Unit] +Description=Weston Wayland compositor +After=dbus.service rc.pvr.service + +[Service] +ExecStart=/usr/bin/weston-launch -u root -- $OPTARGS +ExecStop=/usr/bin/killall -s KILL weston +Type=simple + +[Install] +WantedBy=multi-user.target -- cgit 1.2.3-korg