From e46d6a91dc9e8f0383aa604878ec2d8db04a85ce Mon Sep 17 00:00:00 2001 From: Thuy Tran Date: Tue, 30 Oct 2018 12:26:45 +0900 Subject: rcar-gen3: weston: Update to support weston 5.0 This commit uses the weston upstream version 5.0 with "GPU only" h/w acceleration. It also modifies weston-init to adapt upstream version. Signed-off-by: Thuy Tran Signed-off-by: Takamitsu Honda --- .../recipes-graphics/wayland/weston-init.bbappend | 23 +------ .../recipes-graphics/wayland/weston-init/init | 53 --------------- .../wayland/weston-init/weston-start | 74 --------------------- .../wayland/weston-init/weston.service | 11 --- .../recipes-graphics/wayland/weston/weston.desktop | 9 --- .../recipes-graphics/wayland/weston/weston.png | Bin 2383 -> 0 bytes .../wayland/weston/weston_v4l2.ini | 6 -- .../wayland/weston/xwayland.weston-start | 7 -- .../recipes-graphics/wayland/weston_%.bbappend | 37 +++++++++++ .../recipes-graphics/wayland/weston_2.0.0.bbappend | 63 ------------------ 10 files changed, 38 insertions(+), 245 deletions(-) delete mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston-init/init delete mode 100755 meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start delete mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.service delete mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston/weston.desktop delete mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston/weston.png delete mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston/weston_v4l2.ini delete mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston/xwayland.weston-start create mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend delete mode 100644 meta-rcar-gen3/recipes-graphics/wayland/weston_2.0.0.bbappend (limited to 'meta-rcar-gen3/recipes-graphics') diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend b/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend index 07dab05..dafc033 100644 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend @@ -1,30 +1,9 @@ require include/gles-control.inc -require include/multimedia-control.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI = " \ - file://init \ - file://weston.service \ - file://weston-start \ -" do_install_append() { - # Install weston-start script - install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start - sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start - sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start - if [ "X${USE_GLES}" = "X1" ]; then - sed -e "/RequiresMountsFor=\/run/a Wants=rc.pvr.service" \ - -e "/RequiresMountsFor=\/run/a After=rc.pvr.service" \ + sed -e "/RequiresMountsFor=\/run/a After=dbus.service multi-user.target" \ -e "s/\$OPTARGS/--idle-time=0 \$OPTARGS/" \ -i ${D}/${systemd_system_unitdir}/weston.service fi - - if [ "X${USE_MULTIMEDIA}" = "X1" ]; then - if [ "X${USE_V4L2_RENDERER}" = "X1" ]; then - sed -e "s/\$OPTARGS/--use-v4l2 \$OPTARGS/" \ - -i ${D}/${systemd_system_unitdir}/weston.service - fi - fi } diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston-init/init b/meta-rcar-gen3/recipes-graphics/wayland/weston-init/init deleted file mode 100644 index d3e87c6..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston-init/init +++ /dev/null @@ -1,53 +0,0 @@ -#!/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 deleted file mode 100755 index 4657513..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston-start +++ /dev/null @@ -1,74 +0,0 @@ -#!/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 deleted file mode 100644 index cc47419..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Weston Wayland compositor -After=dbus.service rc.pvr.service multi-user.target - -[Service] -ExecStart=/usr/bin/weston-launch -u root -- $OPTARGS -ExecStop=/usr/bin/killall -s KILL weston -Type=simple - -[Install] -WantedBy=multi-user.target diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.desktop b/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.desktop deleted file mode 100644 index 1086ae8..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Type=Application -Name=Weston -Comment=Wayland Compostitor -Exec=weston -Icon=weston -Terminal=false -Categories=Utility; diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.png b/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.png deleted file mode 100644 index ea8b7e0..0000000 Binary files a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.png and /dev/null differ diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston_v4l2.ini b/meta-rcar-gen3/recipes-graphics/wayland/weston/weston_v4l2.ini deleted file mode 100644 index 8e2e70f..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston_v4l2.ini +++ /dev/null @@ -1,6 +0,0 @@ -[core] -repaint-window=34 - -[v4l2-renderer] -device=/dev/media1 -device-module=vsp2 diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston/xwayland.weston-start b/meta-rcar-gen3/recipes-graphics/wayland/weston/xwayland.weston-start deleted file mode 100644 index b483c97..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston/xwayland.weston-start +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if type Xwayland >/dev/null 2>/dev/null; then - mkdir -p /tmp/.X11-unix - - add_weston_argument "--modules=xwayland.so" -fi diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend b/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 0000000..18ed8ce --- /dev/null +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,37 @@ +require weston.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append = " \ + file://weston.ini \ + file://weston.sh \ +" + +do_install_append() { + install -d ${D}/${sysconfdir}/xdg/weston + # install weston.ini as sample settings of gl-renderer + install -m 644 ${WORKDIR}/weston.ini ${D}/${sysconfdir}/xdg/weston/ + + # Checking for ivi-shell configuration + # If ivi-shell is enable, we will add its configs to weston.ini + if [ "X${USE_WAYLAND_IVI_SHELL}" = "X1" ]; then + sed -i '/repaint-window=34/c\repaint-window=34\nshell=ivi-shell.so' \ + ${D}/${sysconfdir}/xdg/weston/weston.ini + sed -e '$a\\' \ + -e '$a\[ivi-shell]' \ + -e '$a\ivi-module=ivi-controller.so' \ + -e '$a\ivi-input-module=ivi-input-controller.so' \ + -e '$a\transition-duration=300' \ + -e '$a\cursor-theme=default' \ + -i ${D}/${sysconfdir}/xdg/weston/weston.ini + fi + + # Set XDG_RUNTIME_DIR to /run/user/$UID (e.g. run/user/0) + install -d ${D}/${sysconfdir}/profile.d + install -m 0755 ${WORKDIR}/weston.sh ${D}/${sysconfdir}/profile.d/weston.sh +} + +FILES_${PN}_append = " \ + ${sysconfdir}/xdg/weston/weston.ini \ + ${sysconfdir}/profile.d/weston.sh \ +" diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston_2.0.0.bbappend b/meta-rcar-gen3/recipes-graphics/wayland/weston_2.0.0.bbappend deleted file mode 100644 index ec1434e..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston_2.0.0.bbappend +++ /dev/null @@ -1,63 +0,0 @@ -require weston.inc - -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -BRANCH = "rcar-gen3/2.0.0/gl-fallback" - -SRCREV = "84709ddcbf1e94edae96038f530e9ddd855f707f" - -SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" - -SRC_URI_append = " \ - git://github.com/renesas-rcar/weston.git;branch=${BRANCH} \ - file://weston.png \ - file://weston.desktop \ - file://xwayland.weston-start \ - file://weston.ini \ - file://weston_v4l2.ini \ - file://weston.sh \ -" - -S = "${WORKDIR}/git" - -PACKAGECONFIG_append = " \ - ${@oe.utils.conditional('USE_MULTIMEDIA', '1', ' v4l2', '', d)} \ -" -PACKAGECONFIG[v4l2] = " --enable-v4l2, --disable-v4l2,,kernel-module-vsp2driver" - -do_install_append() { - install -d ${D}/${sysconfdir}/xdg/weston - if [ "X${USE_MULTIMEDIA}" = "X1" ]; then - # install weston.ini as sample settings of v4l2-renderer - if [ "${MACHINE}" = "m3ulcb" -o "${MACHINE}" = "h3ulcb" ] ; then - sed -i 's|media1|media0|g' ${WORKDIR}/weston_v4l2.ini - fi - install -m 644 ${WORKDIR}/weston_v4l2.ini ${D}/${sysconfdir}/xdg/weston/weston.ini - else - # install weston.ini as sample settings of gl-renderer - install -m 644 ${WORKDIR}/weston.ini ${D}/${sysconfdir}/xdg/weston/ - fi - - # Checking for ivi-shell configuration - # If ivi-shell is enable, we will add its configs to weston.ini - if [ "X${USE_WAYLAND_IVI_SHELL}" = "X1" ]; then - sed -i '/repaint-window=34/c\repaint-window=34\nshell=ivi-shell.so' \ - ${D}/${sysconfdir}/xdg/weston/weston.ini - sed -e '$a\\' \ - -e '$a\[ivi-shell]' \ - -e '$a\ivi-module=ivi-controller.so' \ - -e '$a\ivi-input-module=ivi-input-controller.so' \ - -e '$a\transition-duration=300' \ - -e '$a\cursor-theme=default' \ - -i ${D}/${sysconfdir}/xdg/weston/weston.ini - fi - - # Set XDG_RUNTIME_DIR to /run/user/$UID (e.g. run/user/0) - install -d ${D}/${sysconfdir}/profile.d - install -m 0755 ${WORKDIR}/weston.sh ${D}/${sysconfdir}/profile.d/weston.sh -} - -FILES_${PN}_append = " \ - ${sysconfdir}/xdg/weston/weston.ini \ - ${sysconfdir}/profile.d/weston.sh \ -" -- cgit 1.2.3-korg