diff options
author | Khang Nguyen <khang.nguyen.xw@renesas.com> | 2019-06-20 16:18:28 +0700 |
---|---|---|
committer | Khang Nguyen <khang.nguyen.xw@renesas.com> | 2019-09-24 08:16:21 +0700 |
commit | bc759aebc054b4768e2bc516de466fa9c7ce0bb5 (patch) | |
tree | 0bebf0d3ce865d1703d7ab14be79d8ce709ee2c5 /meta-rcar-gen3/recipes-graphics | |
parent | 1feca724cafb604db9075d9b640785a1d96758f3 (diff) |
rcar-gen3: weston: Update to support weston 6.0
This commit uses the weston upstream version 6.0 with "GPU
only" h/w acceleration. It also modifies weston-init to adapt
upstream version.
Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com>
Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
Change-Id: I7aabf0f3fcfec0dece05161529bd9eaf401dfbdb
Diffstat (limited to 'meta-rcar-gen3/recipes-graphics')
13 files changed, 35 insertions, 245 deletions
diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston-conf.bbappend b/meta-rcar-gen3/recipes-graphics/wayland/weston-conf.bbappend new file mode 100644 index 0000000..179651b --- /dev/null +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston-conf.bbappend @@ -0,0 +1,34 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI = " \ + 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}/profile.d/weston.sh \ +" diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.ini b/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.ini index f31c290..f31c290 100644 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.ini +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.ini diff --git a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.sh b/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.sh index 33ed8a4..33ed8a4 100755 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.sh +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston-conf/weston.sh 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 - $0 <openvt arguments> -- <weston options> -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 Binary files differdeleted file mode 100644 index ea8b7e0..0000000 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston/weston.png +++ /dev/null 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.inc b/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend index c1cc206..c1cc206 100644 --- a/meta-rcar-gen3/recipes-graphics/wayland/weston.inc +++ b/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend 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 fced56c..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}" = "m3nulcb" -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 \ -" |