summaryrefslogtreecommitdiffstats
path: root/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics')
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend4
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/libpng/libpng_%.bbappend2
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv-samples_2.4.bb39
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch28
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch112
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Revert-cuda-fix-fp16-compilation.patch27
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/fixpkgconfig.patch29
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/opencv-fix-pkgconfig-generation.patch44
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/uselocalxfeatures.patch12
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/useoeprotobuf.patch13
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb96
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb177
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch24
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch1577
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch96
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch90
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch56
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch50
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch44
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init.bbappend11
-rwxr-xr-xbsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init/weston_exp.sh11
-rw-r--r--bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend13
22 files changed, 2555 insertions, 0 deletions
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend
new file mode 100644
index 00000000..fa555a8d
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/cairo/cairo_1.14.12.bbappend
@@ -0,0 +1,4 @@
+require include/gles-control.inc
+
+PACKAGECONFIG_pn-cairo_append = "${@' egl glesv2' if '${USE_GLES_WAYLAND}' == '1' else ''}"
+PACKAGECONFIG_pn-cairo_append += "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/libpng/libpng_%.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/libpng/libpng_%.bbappend
new file mode 100644
index 00000000..252fec35
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/libpng/libpng_%.bbappend
@@ -0,0 +1,2 @@
+# ...use neon acceleration
+EXTRA_OECONF_append_aarch64 = " --enable-arm-neon=on"
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv-samples_2.4.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv-samples_2.4.bb
new file mode 100644
index 00000000..9d862fe9
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv-samples_2.4.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Opencv : The Open Computer Vision Library"
+HOMEPAGE = "http://opencv.willowgarage.com/wiki/"
+SECTION = "libs"
+LICENSE = "BSD"
+
+DEPENDS = "opencv"
+
+LIC_FILES_CHKSUM = "file://include/opencv2/opencv.hpp;endline=41;md5=6d690d8488a6fca7a2c192932466bb14 \
+"
+SRCREV = "6fae07ba8867b8fd2c53344a774aab669afa7c5e"
+SRC_URI = "git://github.com/Itseez/opencv.git;branch=2.4 \
+ "
+PV = "2.4.3+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_install() {
+ cd samples/c
+ install -d ${D}/${bindir}
+ install -d ${D}/${datadir}/opencv/samples
+
+ cp * ${D}/${datadir}/opencv/samples || true
+
+ for i in *.c; do
+ echo "compiling $i"
+ ${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .c` $i `pkg-config --libs opencv` || true
+ install -m 0755 `basename $i .c` ${D}/${bindir} || true
+ rm ${D}/${datadir}/opencv/samples/`basename $i .c` || true
+ done
+ for i in *.cpp; do
+ echo "compiling $i"
+ ${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv` || true
+ install -m 0755 `basename $i .cpp` ${D}/${bindir} || true
+ rm ${D}/${datadir}/opencv/samples/`basename $i .cpp` || true
+ done
+}
+
+FILES_${PN}-dev += "${datadir}/opencv/samples/*.c* ${datadir}/opencv/samples/*.vcp* ${datadir}/opencv/samples/build*"
+FILES_${PN} += "${bindir} ${datadir}/opencv"
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
new file mode 100644
index 00000000..1077d05b
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
@@ -0,0 +1,28 @@
+From 049f931207631aa54af55a2917318d032b2ef3fa Mon Sep 17 00:00:00 2001
+From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+Date: Thu, 31 Mar 2016 00:20:15 +0200
+Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp
+
+Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
+---
+ 3rdparty/ippicv/downloader.cmake | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/3rdparty/ippicv/downloader.cmake b/3rdparty/ippicv/downloader.cmake
+index a6016dbe10bc..af4062c8e95e 100644
+--- a/3rdparty/ippicv/downloader.cmake
++++ b/3rdparty/ippicv/downloader.cmake
+@@ -31,8 +31,10 @@ function(_icv_downloader)
+ return() # Not supported
+ endif()
+
++ if(NOT DEFINED OPENCV_ICV_PATH)
+ set(OPENCV_ICV_UNPACK_PATH "${CMAKE_BINARY_DIR}/3rdparty/ippicv")
+ set(OPENCV_ICV_PATH "${OPENCV_ICV_UNPACK_PATH}${OPENCV_ICV_PACKAGE_SUBDIR}")
++ endif()
+
+ if(DEFINED OPENCV_ICV_PACKAGE_DOWNLOADED
+ AND OPENCV_ICV_PACKAGE_DOWNLOADED STREQUAL OPENCV_ICV_PACKAGE_HASH
+--
+2.8.0.rc3
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch
new file mode 100644
index 00000000..b20183b3
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Merge-pull-request-10011-from-jviney-master.patch
@@ -0,0 +1,112 @@
+From b1d208891b9f6ae3968730b120a5d0dcbba679d0 Mon Sep 17 00:00:00 2001
+From: Jonathan Viney <jonathan.viney@gmail.com>
+Date: Sun, 19 Nov 2017 07:08:41 +1300
+Subject: [PATCH] Merge pull request #10011 from jviney:master
+
+Fix build with FFmpeg master. Some deprecated APIs have been removed. (#10011)
+
+* Fix build with FFmpeg master.
+
+* ffmpeg: update AVFMT_RAWPICTURE support removal
+---
+ modules/videoio/src/cap_ffmpeg_impl.hpp | 37 +++++++++++++++++++++++++--------
+ 1 file changed, 28 insertions(+), 9 deletions(-)
+
+diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
+index 5f51e65..4646148 100644
+--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
++++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
+@@ -149,6 +149,10 @@ extern "C" {
+ #define AV_PIX_FMT_GRAY16BE PIX_FMT_GRAY16BE
+ #endif
+
++#ifndef PKT_FLAG_KEY
++#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
++#endif
++
+ #if LIBAVUTIL_BUILD >= (LIBAVUTIL_VERSION_MICRO >= 100 \
+ ? CALC_FFMPEG_VERSION(52, 38, 100) : CALC_FFMPEG_VERSION(52, 13, 0))
+ #define USE_AV_FRAME_GET_BUFFER 1
+@@ -1570,7 +1574,11 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
+ // some formats want stream headers to be seperate
+ if(oc->oformat->flags & AVFMT_GLOBALHEADER)
+ {
++#if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0)
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
++#else
+ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++#endif
+ }
+ #endif
+
+@@ -1598,23 +1606,24 @@ static int icv_av_write_frame_FFMPEG( AVFormatContext * oc, AVStream * video_st,
+ #endif
+ int ret = OPENCV_NO_FRAMES_WRITTEN_CODE;
+
+- if (oc->oformat->flags & AVFMT_RAWPICTURE) {
++#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0)
++ if (oc->oformat->flags & AVFMT_RAWPICTURE)
++ {
+ /* raw video case. The API will change slightly in the near
+ futur for that */
+ AVPacket pkt;
+ av_init_packet(&pkt);
+
+-#ifndef PKT_FLAG_KEY
+-#define PKT_FLAG_KEY AV_PKT_FLAG_KEY
+-#endif
+-
+ pkt.flags |= PKT_FLAG_KEY;
+ pkt.stream_index= video_st->index;
+ pkt.data= (uint8_t *)picture;
+ pkt.size= sizeof(AVPicture);
+
+ ret = av_write_frame(oc, &pkt);
+- } else {
++ }
++ else
++#endif
++ {
+ /* encode the image */
+ AVPacket pkt;
+ av_init_packet(&pkt);
+@@ -1772,7 +1781,9 @@ void CvVideoWriter_FFMPEG::close()
+ /* write the trailer, if any */
+ if(ok && oc)
+ {
+- if( (oc->oformat->flags & AVFMT_RAWPICTURE) == 0 )
++#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0)
++ if (!(oc->oformat->flags & AVFMT_RAWPICTURE))
++#endif
+ {
+ for(;;)
+ {
+@@ -2071,7 +2082,11 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc,
+
+ outbuf = NULL;
+
+- if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
++
++#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(57, 0, 0)
++ if (!(oc->oformat->flags & AVFMT_RAWPICTURE))
++#endif
++ {
+ /* allocate output buffer */
+ /* assume we will never get codec output with more than 4 bytes per pixel... */
+ outbuf_size = width*height*4;
+@@ -2376,7 +2391,11 @@ AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC
+ // some formats want stream headers to be seperate
+ if (oc->oformat->flags & AVFMT_GLOBALHEADER)
+ {
+- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ #if LIBAVCODEC_BUILD > CALC_FFMPEG_VERSION(56, 35, 0)
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
++ #else
++ c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ #endif
+ }
+ #endif
+
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Revert-cuda-fix-fp16-compilation.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Revert-cuda-fix-fp16-compilation.patch
new file mode 100644
index 00000000..507d7968
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/0001-Revert-cuda-fix-fp16-compilation.patch
@@ -0,0 +1,27 @@
+From 69f9707678190f6a0948a547dce948251f972676 Mon Sep 17 00:00:00 2001
+From: Randy MacLeod <Randy.MacLeod@windriver.com>
+Date: Wed, 26 Apr 2017 14:57:30 -0400
+Subject: [PATCH 1/2] Revert "cuda: fix fp16 compilation"
+
+This reverts commit 12e00827be40576b686ea4438a6e6ef85208743d.
+---
+ modules/core/include/opencv2/core/cvdef.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h
+index 699b166..efc24ca 100644
+--- a/modules/core/include/opencv2/core/cvdef.h
++++ b/modules/core/include/opencv2/core/cvdef.h
+@@ -303,8 +303,7 @@ enum CpuFeatures {
+ #define CV_2PI 6.283185307179586476925286766559
+ #define CV_LOG2 0.69314718055994530941723212145818
+
+-#if defined __ARM_FP16_FORMAT_IEEE \
+- && !defined __CUDACC__
++#if defined (__ARM_FP16_FORMAT_IEEE)
+ # define CV_FP16_TYPE 1
+ #else
+ # define CV_FP16_TYPE 0
+--
+2.9.3
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/fixpkgconfig.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/fixpkgconfig.patch
new file mode 100644
index 00000000..3aeda7d4
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/fixpkgconfig.patch
@@ -0,0 +1,29 @@
+diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake
+index b8cb8777c06b..75281ee964fd 100644
+--- a/cmake/OpenCVGenPkgconfig.cmake
++++ b/cmake/OpenCVGenPkgconfig.cmake
+@@ -27,7 +27,7 @@ macro(fix_prefix lst isown)
+ get_filename_component(libdir "${item}" PATH)
+ get_filename_component(libname "${item}" NAME_WE)
+ string(REGEX REPLACE "^lib(.*)" "\\1" libname "${libname}")
+- list(APPEND _lst "-L${libdir}" "-l${libname}")
++ list(APPEND _lst "-l${libname}")
+ else()
+ list(APPEND _lst "-l${item}")
+ endif()
+@@ -66,10 +66,14 @@ ocv_list_unique(_3rdparty)
+
+ set(OPENCV_PC_LIBS
+ "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
++ "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
+ "${_modules}"
+ )
+ if (BUILD_SHARED_LIBS)
+- set(OPENCV_PC_LIBS_PRIVATE "${_extra}")
++ set(OPENCV_PC_LIBS_PRIVATE
++ "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
++ "${_extra}"
++ )
+ else()
+ set(OPENCV_PC_LIBS_PRIVATE
+ "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/opencv-fix-pkgconfig-generation.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/opencv-fix-pkgconfig-generation.patch
new file mode 100644
index 00000000..d352778c
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/opencv-fix-pkgconfig-generation.patch
@@ -0,0 +1,44 @@
+Fix pkg-config generation
+
+Replace absolute library path with library name spec and library search
+path option.
+
+The fix has been provided by Ray Rashif (code.opencv.org/issues/1925)
+
+Upstream-Status: Pending
+
+diff -Nbaur OpenCV-2.4.3.orig/cmake/OpenCVGenPkgconfig.cmake OpenCV-2.4.3/cmake/OpenCVGenPkgconfig.cmake
+--- OpenCV-2.4.3.orig/cmake/OpenCVGenPkgconfig.cmake 2012-11-04 08:40:14.243505926 +0000
++++ OpenCV-2.4.3/cmake/OpenCVGenPkgconfig.cmake 2012-11-04 08:40:42.286649120 +0000
+@@ -10,7 +10,7 @@
+ # -------------------------------------------------------------------------------------------
+ set(prefix "${CMAKE_INSTALL_PREFIX}")
+ set(exec_prefix "\${prefix}")
+-set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
++set(libdir "\${prefix}/${OPENCV_LIB_INSTALL_PATH}")
+ set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
+ set(VERSION ${OPENCV_VERSION})
+
+@@ -36,10 +36,11 @@
+ ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
+
+ #build the list of components
+-set(OpenCV_LIB_COMPONENTS_ "")
++set(OpenCV_LIB_COMPONENTS_ "-L\${libdir}")
+ foreach(CVLib ${OpenCV_LIB_COMPONENTS})
+ get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
+ get_filename_component(libname "${libpath}" NAME)
++ get_filename_component(lname "${libpath}" NAME_WE)
+
+ if(INSTALL_TO_MANGLED_PATHS)
+ set(libname "${libname}.${OPENCV_VERSION}")
+@@ -52,7 +53,8 @@
+ set(installDir "${OPENCV_LIB_INSTALL_PATH}")
+ endif()
+
+- set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
++ string(REPLACE "libopencv" "-lopencv" lname "${lname}")
++ set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} ${lname}")
+ endforeach()
+
+ # add extra dependencies required for OpenCV
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/uselocalxfeatures.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/uselocalxfeatures.patch
new file mode 100644
index 00000000..a2db48d7
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/uselocalxfeatures.patch
@@ -0,0 +1,12 @@
+diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt
+index f295bddaed66..6086e75ec37b 100644
+--- a/modules/xfeatures2d/CMakeLists.txt
++++ b/modules/xfeatures2d/CMakeLists.txt
+@@ -1,5 +1,5 @@
+ set(the_description "Contributed/Experimental Algorithms for Salient 2D Features Detection")
+ ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml
+ OPTIONAL opencv_cudaarithm WRAP python java)
+-include(cmake/download_vgg.cmake)
+-include(cmake/download_boostdesc.cmake)
++#include(cmake/download_vgg.cmake)
++#include(cmake/download_boostdesc.cmake)
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/useoeprotobuf.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/useoeprotobuf.patch
new file mode 100644
index 00000000..3068bd44
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv/useoeprotobuf.patch
@@ -0,0 +1,13 @@
+diff --git a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake
+index eb2a729cc2eb..8717736484de 100644
+--- a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake
++++ b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake
+@@ -24,7 +24,7 @@ if(NOT BUILD_PROTOBUF AND NOT (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF
+ find_package(Protobuf QUIET)
+ endif()
+
+-if(PROTOBUF_FOUND)
++if(PROTOBUF_FOUND OR (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES))
+ # nothing
+ else()
+ include(${CMAKE_CURRENT_LIST_DIR}/download_protobuf.cmake)
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb
new file mode 100644
index 00000000..602b1b45
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_2.4.bb
@@ -0,0 +1,96 @@
+SUMMARY = "Opencv : The Open Computer Vision Library"
+HOMEPAGE = "http://opencv.willowgarage.com/wiki/"
+SECTION = "libs"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://include/opencv2/opencv.hpp;endline=41;md5=6d690d8488a6fca7a2c192932466bb14"
+
+ARM_INSTRUCTION_SET = "arm"
+
+DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0"
+
+SRC_URI = "git://github.com/Itseez/opencv.git;branch=2.4 "
+SRCREV = "707d10f11526afee1e1a35ec7fdaa8b05f7e1656"
+PV = "2.4.11+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+# Do an out-of-tree build
+#OECMAKE_SOURCEPATH = "${S}"
+#OECMAKE_BUILDPATH = "${WORKDIR}/build-${TARGET_ARCH}"
+
+EXTRA_OECMAKE = "-DPYTHON_NUMPY_INCLUDE_DIR:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include \
+ -DBUILD_PYTHON_SUPPORT=ON \
+ -DWITH_GSTREAMER=OFF \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DBUILD_EXAMPLES=ON \
+ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
+ ${@oe.utils.conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64 -DPYTHON_PACKAGES_PATH:PATH=lib64/python2.7/site-packages", "", d)} \
+ ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32 -DPYTHON_PACKAGES_PATH:PATH=lib32/python2.7/site-packages", "", d)} \
+"
+
+PACKAGECONFIG ??= "eigen jpeg png tiff v4l libv4l gstreamer opengl neon ${@bb.utils.contains( 'DISTRO_FEATURES', 'qt5', 'qt5','', d)}"
+PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen,"
+PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+,"
+PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"
+PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav,"
+PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
+PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
+PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils,"
+PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
+PACKAGECONFIG[jasper] = "-DBUILD_JASPER=ON,-DBUILD_JASPER=OFF,"
+PACKAGECONFIG[neon] = "-DENABLE_NEON=ON,-DENABLE_NEON=OFF,,"
+PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good,"
+PACKAGECONFIG[opengl] = "-DWITH_OPENGL=ON,-DWITH_OPENGL=OFF,,"
+PACKAGECONFIG[qt5] = "-DWITH_QT=ON,-DWITH_QT=OFF,qtbase,"
+
+inherit distutils-base pkgconfig cmake ${@bb.utils.contains( 'DISTRO_FEATURES', 'qt5', 'cmake_qt5','', d)}
+
+export BUILD_SYS
+export HOST_SYS
+export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
+export PYTHON="${STAGING_BINDIR_NATIVE}/python"
+
+TARGET_CC_ARCH += "-I${S}/include "
+
+PACKAGES += "${PN}-apps python-opencv"
+
+python populate_packages_prepend () {
+ cv_libdir = d.expand('${libdir}')
+ cv_libdir_dbg = d.expand('${libdir}/.debug')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
+
+ pn = d.getVar('PN', 1)
+ metapkg = pn + '-dev'
+ d.setVar('ALLOW_EMPTY_' + metapkg, "1")
+ blacklist = [ metapkg ]
+ metapkg_rdepends = [ ]
+ packages = d.getVar('PACKAGES', 1).split()
+ for pkg in packages[1:]:
+ if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
+ metapkg_rdepends.append(pkg)
+ d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
+}
+
+PACKAGES_DYNAMIC += "^libopencv-.*"
+
+FILES_${PN} = ""
+FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV"
+FILES_${PN}-dbg += "${libdir}/.debug"
+FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
+FILES_${PN}-doc = "${datadir}/OpenCV/doc"
+
+ALLOW_EMPTY_${PN} = "1"
+
+INSANE_SKIP_python-opencv = "True"
+SUMMARY_python-opencv = "Python bindings to opencv"
+FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
+RDEPENDS_python-opencv = "python-core python-numpy"
+
+do_install_append() {
+ cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/
+ sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h
+}
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb
new file mode 100644
index 00000000..01ed0210
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/opencv/opencv_3.2.bb
@@ -0,0 +1,177 @@
+SUMMARY = "Opencv : The Open Computer Vision Library"
+HOMEPAGE = "http://opencv.org/"
+SECTION = "libs"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2b2f8752cc5edf504d283107d033f544"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+DEPENDS = "libtool swig-native bzip2 zlib glib-2.0"
+
+#DEPENDS = "libwebp"
+
+SRCREV_opencv = "70bbf17b133496bd7d54d034b0f94bd869e0e810"
+SRCREV_contrib = "86342522b0eb2b16fa851c020cc4e0fef4e010b7"
+SRCREV_ipp = "81a676001ca8075ada498583e4166079e5744668"
+SRCREV_bootdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
+SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
+IPP_MD5 = "808b791a6eac9ed78d32a7666804320e"
+
+SRCREV_FORMAT = "opencv"
+SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
+ git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
+ git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20151201;destsuffix=ipp;name=ipp \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=bootdesc;name=bootdesc \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
+ file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
+ file://fixpkgconfig.patch \
+ file://uselocalxfeatures.patch;patchdir=../contrib/ \
+ file://useoeprotobuf.patch;patchdir=../contrib/ \
+ file://0001-Revert-cuda-fix-fp16-compilation.patch \
+ file://0001-Merge-pull-request-10011-from-jviney-master.patch \
+"
+# file://0002-Revert-check-FP16-build-condition-correctly.patch \
+#
+
+PV = "3.2+git${SRCPV}"
+
+S = "${WORKDIR}/git"
+
+do_unpack_extra() {
+ tar xzf ${WORKDIR}/ipp/ippicv/ippicv_linux_20151201.tgz -C ${WORKDIR}
+ cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
+ cp ${WORKDIR}/bootdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
+}
+addtask unpack_extra after do_unpack before do_patch
+
+EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
+ -DWITH_1394=OFF \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DOPENCV_ICV_PACKAGE_DOWNLOADED=${IPP_MD5} \
+ -DOPENCV_ICV_PATH=${WORKDIR}/ippicv_lnx \
+ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
+ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
+ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
+ ${@oe.utils.conditional("libdir", "/usr/lib64", "-DLIB_SUFFIX=64", "", d)} \
+ ${@oe.utils.conditional("libdir", "/usr/lib32", "-DLIB_SUFFIX=32", "", d)} \
+"
+EXTRA_OECMAKE_append_x86 = " -DX86=ON"
+
+PACKAGECONFIG ??= "eigen jpeg png tiff v4l libv4l gstreamer samples tbb \
+ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)} \
+ ${@bb.utils.contains("DISTRO_FEATURES", "qt5", "qt5", "", d)}"
+
+PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas,"
+PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft,"
+PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DUPDATE_PROTO_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,lapack protobuf protobuf-native,"
+PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog,"
+PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype,"
+PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2,"
+PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base,"
+PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+3,"
+PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper,"
+PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native fastjar-native openjdk-8-native,"
+PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"
+PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav,"
+PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils,"
+PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd,"
+PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native,"
+PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
+PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python-numpy,"
+PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy,"
+PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,,"
+PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb,"
+PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract,"
+PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
+PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
+PACKAGECONFIG[qt5] = "-DWITH_QT=ON,-DWITH_QT=OFF,qtbase,"
+
+inherit pkgconfig cmake ${@bb.utils.contains( 'DISTRO_FEATURES', 'qt5', 'cmake_qt5','', d)}
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'distutils3-base', '', d)}
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)}
+
+export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
+export PYTHON="${STAGING_BINDIR_NATIVE}/${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3', 'python', d)}"
+export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java"
+export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native"
+export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/"
+
+TARGET_CC_ARCH += "-I${S}/include "
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python-${BPN}', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \
+ ${PN}-apps"
+
+python populate_packages_prepend () {
+ cv_libdir = d.expand('${libdir}')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
+
+ pn = d.getVar('PN', 1)
+ metapkg = pn + '-dev'
+ d.setVar('ALLOW_EMPTY_' + metapkg, "1")
+ blacklist = [ metapkg ]
+ metapkg_rdepends = [ ]
+ packages = d.getVar('PACKAGES', 1).split()
+ for pkg in packages[1:]:
+ if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
+ metapkg_rdepends.append(pkg)
+ d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
+
+ metapkg = pn
+ blacklist = [ metapkg ]
+ metapkg_rdepends = [ ]
+ for pkg in packages[1:]:
+ if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'):
+ metapkg_rdepends.append(pkg)
+ d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
+
+}
+
+PACKAGES_DYNAMIC += "^libopencv-.*"
+
+FILES_${PN} = ""
+FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*"
+FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${datadir}/OpenCV/*.cmake"
+FILES_${PN}-staticdev += "${datadir}/OpenCV/3rdparty/lib/*.a"
+FILES_${PN}-apps = "${bindir}/* ${datadir}/OpenCV"
+FILES_${PN}-java = "${datadir}/OpenCV/java"
+FILES_${PN}-samples = "${datadir}/OpenCV/samples/"
+
+INSANE_SKIP_${PN}-java = "libdir"
+INSANE_SKIP_${PN}-dbg = "libdir"
+
+ALLOW_EMPTY_${PN} = "1"
+
+SUMMARY_python-opencv = "Python bindings to opencv"
+FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
+RDEPENDS_python-opencv = "python-core python-numpy"
+
+SUMMARY_python3-opencv = "Python bindings to opencv"
+FILES_python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
+RDEPENDS_python3-opencv = "python3-core python3-numpy"
+
+do_install_append() {
+ cp ${S}/include/opencv/*.h ${D}${includedir}/opencv/
+ sed -i '/blobtrack/d' ${D}${includedir}/opencv/cvaux.h
+
+ # Move Python files into correct library folder (for multilib build)
+ if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then
+ mv ${D}/usr/lib/* ${D}/${libdir}/
+ rm -rf ${D}/usr/lib
+ fi
+
+ if ${@bb.utils.contains("PACKAGECONFIG", "samples", "true", "false", d)}; then
+ install -d ${D}${datadir}/OpenCV/samples/bin/
+ cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/
+ fi
+}
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch
new file mode 100644
index 00000000..d453103e
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0001-Allow-to-boot-without-input-device.patch
@@ -0,0 +1,24 @@
+From 980b48bc279d46559465665e94e546f661d1d427 Mon Sep 17 00:00:00 2001
+From: Grigory Kletsko <grigory.kletsko@cogentembedded.com>
+Date: Fri, 17 Feb 2017 03:06:27 +0300
+Subject: [PATCH 1/7] Allow to boot without input device
+
+---
+ libweston/libinput-seat.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/libweston/libinput-seat.c b/libweston/libinput-seat.c
+index ac1e8e9..b7f601a 100644
+--- a/libweston/libinput-seat.c
++++ b/libweston/libinput-seat.c
+@@ -302,7 +302,6 @@ udev_input_enable(struct udev_input *input)
+ "\t- seats misconfigured "
+ "(Weston backend option 'seat', "
+ "udev device property ID_SEAT)\n");
+- return -1;
+ }
+
+ return 0;
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch
new file mode 100644
index 00000000..a641cb30
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0002-Share-toytoolkit-lib.patch
@@ -0,0 +1,1577 @@
+From 6e0aeaec800a9155a09c8b94c33705acc420ab1b Mon Sep 17 00:00:00 2001
+From: Grigory Kletsko <grigory.kletsko@cogentembedded.com>
+Date: Tue, 13 Jun 2017 23:51:22 +0300
+Subject: [PATCH 2/7] Share toytoolkit lib
+
+---
+ Makefile.am | 35 +++
+ clients/toytoolkit.h | 741 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ clients/window.h | 714 +------------------------------------------------
+ configure.ac | 2 +-
+ 4 files changed, 778 insertions(+), 714 deletions(-)
+ create mode 100644 clients/toytoolkit.h
+
+diff --git a/Makefile.am b/Makefile.am
+index 83bb253..9433362 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -8,6 +8,7 @@ module_LTLIBRARIES =
+ libweston_moduledir = $(libdir)/libweston-$(LIBWESTON_MAJOR)
+ libweston_module_LTLIBRARIES =
+ noinst_LTLIBRARIES =
++lib_LTLIBRARIES =
+ BUILT_SOURCES =
+
+ AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
+@@ -101,6 +102,7 @@ libweston_@LIBWESTON_MAJOR@_la_SOURCES = \
+ shared/matrix.h \
+ shared/timespec-util.h \
+ shared/zalloc.h \
++ clients/toytoolkit.h \
+ shared/platform.h \
+ shared/weston-egl-ext.h
+
+@@ -279,6 +281,7 @@ dist_wayland_session_DATA = compositor/weston.desktop
+
+ libwestonincludedir = $(includedir)/libweston-${LIBWESTON_MAJOR}
+ libwestoninclude_HEADERS = \
++ clients/toytoolkit.h \
+ libweston/version.h \
+ libweston/compositor.h \
+ libweston/compositor-drm.h \
+@@ -655,6 +658,7 @@ noinst_LTLIBRARIES += libtoytoolkit.la
+ libtoytoolkit_la_SOURCES = \
+ clients/window.c \
+ clients/window.h \
++ clients/toytoolkit.h \
+ shared/helpers.h
+
+ nodist_libtoytoolkit_la_SOURCES = \
+@@ -680,6 +684,37 @@ libtoytoolkit_la_LIBADD = \
+ libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm
+ libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS)
+
++lib_LTLIBRARIES += libweston-toytoolkit.la
++
++libweston_toytoolkit_la_SOURCES = \
++ clients/window.c \
++ clients/window.h \
++ clients/toytoolkit.h \
++ protocol/text-cursor-position-protocol.c \
++ protocol/text-cursor-position-client-protocol.h \
++ protocol/viewporter-client-protocol.h \
++ protocol/viewporter-protocol.c \
++ protocol/xdg-shell-unstable-v6-protocol.c \
++ protocol/xdg-shell-unstable-v6-client-protocol.h \
++ \
++ \
++ protocol/ivi-application-protocol.c \
++ protocol/ivi-application-client-protocol.h
++
++BUILT_SOURCES += $(libweston_toytoolkit_la_SOURCES)
++
++libweston_toytoolkit_la_CFLAGS = \
++ $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS) \
++ $(GCC_CFLAGS) -pthread -fvisibility=default
++libweston_toytoolkit_la_LIBADD = \
++ $(CLIENT_LIBS) \
++ $(CAIRO_EGL_LIBS) \
++ libshared-cairo.la -lrt -lm
++libweston_toytoolkit_la_LDFLAGS = -version-info 1:0:1
++
++
++
++
+ weston_flower_SOURCES = clients/flower.c
+ weston_flower_LDADD = libtoytoolkit.la
+ weston_flower_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
+diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h
+new file mode 100644
+index 0000000..1c0b77d
+--- /dev/null
++++ b/clients/toytoolkit.h
+@@ -0,0 +1,741 @@
++/*
++ * Copyright © 2008 Kristian Høgsberg
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ */
++
++#ifndef _TOYTOOLKIT_H_
++#define _TOYTOOLKIT_H_
++
++#include <time.h>
++#include <xkbcommon/xkbcommon.h>
++#include <wayland-client.h>
++#include <cairo.h>
++
++struct window;
++struct widget;
++struct display;
++struct input;
++struct output;
++
++struct task {
++ void (*run)(struct task *task, uint32_t events);
++ struct wl_list link;
++};
++
++struct rectangle {
++ int32_t x;
++ int32_t y;
++ int32_t width;
++ int32_t height;
++};
++
++struct display *
++display_create(int *argc, char *argv[]);
++
++void
++display_destroy(struct display *display);
++
++void
++display_set_user_data(struct display *display, void *data);
++
++void *
++display_get_user_data(struct display *display);
++
++struct wl_display *
++display_get_display(struct display *display);
++
++int
++display_has_subcompositor(struct display *display);
++
++cairo_device_t *
++display_get_cairo_device(struct display *display);
++
++struct wl_compositor *
++display_get_compositor(struct display *display);
++
++struct output *
++display_get_output(struct display *display);
++
++uint32_t
++display_get_serial(struct display *display);
++
++typedef void (*display_global_handler_t)(struct display *display,
++ uint32_t name,
++ const char *interface,
++ uint32_t version, void *data);
++
++void
++display_set_global_handler(struct display *display,
++ display_global_handler_t handler);
++void
++display_set_global_handler_remove(struct display *display,
++ display_global_handler_t remove_handler);
++void *
++display_bind(struct display *display, uint32_t name,
++ const struct wl_interface *interface, uint32_t version);
++
++typedef void (*display_output_handler_t)(struct output *output, void *data);
++
++/*
++ * The output configure handler is called, when a new output is connected
++ * and we know its current mode, or when the current mode changes.
++ * Test and set the output user data in your handler to know, if the
++ * output is new. Note: 'data' in the configure handler is the display
++ * user data.
++ */
++void
++display_set_output_configure_handler(struct display *display,
++ display_output_handler_t handler);
++
++struct wl_data_source *
++display_create_data_source(struct display *display);
++
++#ifdef EGL_NO_DISPLAY
++EGLDisplay
++display_get_egl_display(struct display *d);
++
++EGLConfig
++display_get_argb_egl_config(struct display *d);
++
++int
++display_acquire_window_surface(struct display *display,
++ struct window *window,
++ EGLContext ctx);
++void
++display_release_window_surface(struct display *display,
++ struct window *window);
++#endif
++
++#define SURFACE_OPAQUE 0x01
++#define SURFACE_SHM 0x02
++
++#define SURFACE_HINT_RESIZE 0x10
++
++#define SURFACE_HINT_RGB565 0x100
++
++cairo_surface_t *
++display_create_surface(struct display *display,
++ struct wl_surface *surface,
++ struct rectangle *rectangle,
++ uint32_t flags);
++
++struct wl_buffer *
++display_get_buffer_for_surface(struct display *display,
++ cairo_surface_t *surface);
++
++struct wl_cursor_image *
++display_get_pointer_image(struct display *display, int pointer);
++
++void
++display_defer(struct display *display, struct task *task);
++
++void
++display_watch_fd(struct display *display,
++ int fd, uint32_t events, struct task *task);
++
++void
++display_unwatch_fd(struct display *display, int fd);
++
++void
++display_run(struct display *d);
++
++void
++display_exit(struct display *d);
++
++int
++display_get_data_device_manager_version(struct display *d);
++
++enum cursor_type {
++ CURSOR_BOTTOM_LEFT,
++ CURSOR_BOTTOM_RIGHT,
++ CURSOR_BOTTOM,
++ CURSOR_DRAGGING,
++ CURSOR_LEFT_PTR,
++ CURSOR_LEFT,
++ CURSOR_RIGHT,
++ CURSOR_TOP_LEFT,
++ CURSOR_TOP_RIGHT,
++ CURSOR_TOP,
++ CURSOR_IBEAM,
++ CURSOR_HAND1,
++ CURSOR_WATCH,
++ CURSOR_DND_MOVE,
++ CURSOR_DND_COPY,
++ CURSOR_DND_FORBIDDEN,
++
++ CURSOR_BLANK
++};
++
++typedef void (*window_key_handler_t)(struct window *window, struct input *input,
++ uint32_t time, uint32_t key, uint32_t unicode,
++ enum wl_keyboard_key_state state, void *data);
++
++typedef void (*window_keyboard_focus_handler_t)(struct window *window,
++ struct input *device, void *data);
++
++typedef void (*window_data_handler_t)(struct window *window,
++ struct input *input,
++ float x, float y,
++ const char **types,
++ void *data);
++
++typedef void (*window_drop_handler_t)(struct window *window,
++ struct input *input,
++ int32_t x, int32_t y, void *data);
++
++typedef void (*window_close_handler_t)(void *data);
++typedef void (*window_fullscreen_handler_t)(struct window *window, void *data);
++
++typedef void (*window_output_handler_t)(struct window *window, struct output *output,
++ int enter, void *data);
++typedef void (*window_state_changed_handler_t)(struct window *window,
++ void *data);
++
++
++typedef void (*window_locked_pointer_motion_handler_t)(struct window *window,
++ struct input *input,
++ uint32_t time,
++ float x, float y,
++ void *data);
++
++typedef void (*locked_pointer_locked_handler_t)(struct window *window,
++ struct input *input,
++ void *data);
++
++typedef void (*locked_pointer_unlocked_handler_t)(struct window *window,
++ struct input *input,
++ void *data);
++
++typedef void (*confined_pointer_confined_handler_t)(struct window *window,
++ struct input *input,
++ void *data);
++
++typedef void (*confined_pointer_unconfined_handler_t)(struct window *window,
++ struct input *input,
++ void *data);
++
++typedef void (*widget_resize_handler_t)(struct widget *widget,
++ int32_t width, int32_t height,
++ void *data);
++typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data);
++
++typedef int (*widget_enter_handler_t)(struct widget *widget,
++ struct input *input,
++ float x, float y, void *data);
++typedef void (*widget_leave_handler_t)(struct widget *widget,
++ struct input *input, void *data);
++typedef int (*widget_motion_handler_t)(struct widget *widget,
++ struct input *input, uint32_t time,
++ float x, float y, void *data);
++typedef void (*widget_button_handler_t)(struct widget *widget,
++ struct input *input, uint32_t time,
++ uint32_t button,
++ enum wl_pointer_button_state state,
++ void *data);
++typedef void (*widget_touch_down_handler_t)(struct widget *widget,
++ struct input *input,
++ uint32_t serial,
++ uint32_t time,
++ int32_t id,
++ float x,
++ float y,
++ void *data);
++typedef void (*widget_touch_up_handler_t)(struct widget *widget,
++ struct input *input,
++ uint32_t serial,
++ uint32_t time,
++ int32_t id,
++ void *data);
++typedef void (*widget_touch_motion_handler_t)(struct widget *widget,
++ struct input *input,
++ uint32_t time,
++ int32_t id,
++ float x,
++ float y,
++ void *data);
++typedef void (*widget_touch_frame_handler_t)(struct widget *widget,
++ struct input *input, void *data);
++typedef void (*widget_touch_cancel_handler_t)(struct widget *widget,
++ struct input *input, void *data);
++typedef void (*widget_axis_handler_t)(struct widget *widget,
++ struct input *input, uint32_t time,
++ uint32_t axis,
++ wl_fixed_t value,
++ void *data);
++
++typedef void (*widget_pointer_frame_handler_t)(struct widget *widget,
++ struct input *input,
++ void *data);
++
++typedef void (*widget_axis_source_handler_t)(struct widget *widget,
++ struct input *input,
++ uint32_t source,
++ void *data);
++
++typedef void (*widget_axis_stop_handler_t)(struct widget *widget,
++ struct input *input,
++ uint32_t time,
++ uint32_t axis,
++ void *data);
++
++typedef void (*widget_axis_discrete_handler_t)(struct widget *widget,
++ struct input *input,
++ uint32_t axis,
++ int32_t discrete,
++ void *data);
++
++struct window *
++window_create(struct display *display);
++struct window *
++window_create_custom(struct display *display);
++
++void
++window_set_parent(struct window *window, struct window *parent_window);
++struct window *
++window_get_parent(struct window *window);
++
++int
++window_has_focus(struct window *window);
++
++typedef void (*menu_func_t)(void *data, struct input *input, int index);
++
++void
++window_show_menu(struct display *display,
++ struct input *input, uint32_t time, struct window *parent,
++ int32_t x, int32_t y,
++ menu_func_t func, const char **entries, int count);
++
++void
++window_show_frame_menu(struct window *window,
++ struct input *input, uint32_t time);
++
++int
++window_get_buffer_transform(struct window *window);
++
++void
++window_set_buffer_transform(struct window *window,
++ enum wl_output_transform transform);
++
++uint32_t
++window_get_buffer_scale(struct window *window);
++
++void
++window_set_buffer_scale(struct window *window,
++ int32_t scale);
++
++uint32_t
++window_get_output_scale(struct window *window);
++
++void
++window_destroy(struct window *window);
++
++struct widget *
++window_add_widget(struct window *window, void *data);
++
++enum subsurface_mode {
++ SUBSURFACE_SYNCHRONIZED,
++ SUBSURFACE_DESYNCHRONIZED
++};
++
++struct widget *
++window_add_subsurface(struct window *window, void *data,
++ enum subsurface_mode default_mode);
++
++typedef void (*data_func_t)(void *data, size_t len,
++ int32_t x, int32_t y, void *user_data);
++
++struct display *
++window_get_display(struct window *window);
++void
++window_move(struct window *window, struct input *input, uint32_t time);
++void
++window_get_allocation(struct window *window, struct rectangle *allocation);
++void
++window_schedule_redraw(struct window *window);
++void
++window_schedule_resize(struct window *window, int width, int height);
++
++int
++window_lock_pointer(struct window *window, struct input *input);
++
++void
++window_unlock_pointer(struct window *window);
++
++void
++widget_set_locked_pointer_cursor_hint(struct widget *widget,
++ float x, float y);
++
++int
++window_confine_pointer_to_rectangles(struct window *window,
++ struct input *input,
++ struct rectangle *rectangles,
++ int num_rectangles);
++
++void
++window_update_confine_rectangles(struct window *window,
++ struct rectangle *rectangles,
++ int num_rectangles);
++
++int
++window_confine_pointer_to_widget(struct window *window,
++ struct widget *widget,
++ struct input *input);
++
++void
++window_unconfine_pointer(struct window *window);
++
++cairo_surface_t *
++window_get_surface(struct window *window);
++
++struct wl_surface *
++window_get_wl_surface(struct window *window);
++
++struct wl_subsurface *
++widget_get_wl_subsurface(struct widget *widget);
++
++enum window_buffer_type {
++ WINDOW_BUFFER_TYPE_EGL_WINDOW,
++ WINDOW_BUFFER_TYPE_SHM,
++};
++
++void
++display_surface_damage(struct display *display, cairo_surface_t *cairo_surface,
++ int32_t x, int32_t y, int32_t width, int32_t height);
++
++void
++window_set_buffer_type(struct window *window, enum window_buffer_type type);
++
++enum window_buffer_type
++window_get_buffer_type(struct window *window);
++
++int
++window_is_fullscreen(struct window *window);
++
++void
++window_set_fullscreen(struct window *window, int fullscreen);
++
++int
++window_is_maximized(struct window *window);
++
++void
++window_set_maximized(struct window *window, int maximized);
++
++int
++window_is_resizing(struct window *window);
++
++void
++window_set_minimized(struct window *window);
++
++void
++window_set_user_data(struct window *window, void *data);
++
++void *
++window_get_user_data(struct window *window);
++
++void
++window_set_key_handler(struct window *window,
++ window_key_handler_t handler);
++
++void
++window_set_keyboard_focus_handler(struct window *window,
++ window_keyboard_focus_handler_t handler);
++
++void
++window_set_data_handler(struct window *window,
++ window_data_handler_t handler);
++
++void
++window_set_drop_handler(struct window *window,
++ window_drop_handler_t handler);
++
++void
++window_set_close_handler(struct window *window,
++ window_close_handler_t handler);
++void
++window_set_fullscreen_handler(struct window *window,
++ window_fullscreen_handler_t handler);
++void
++window_set_output_handler(struct window *window,
++ window_output_handler_t handler);
++void
++window_set_state_changed_handler(struct window *window,
++ window_state_changed_handler_t handler);
++
++void
++window_set_pointer_locked_handler(struct window *window,
++ locked_pointer_locked_handler_t locked,
++ locked_pointer_unlocked_handler_t unlocked);
++
++void
++window_set_pointer_confined_handler(struct window *window,
++ confined_pointer_confined_handler_t confined,
++ confined_pointer_unconfined_handler_t unconfined);
++
++void
++window_set_locked_pointer_motion_handler(
++ struct window *window, window_locked_pointer_motion_handler_t handler);
++
++void
++window_set_title(struct window *window, const char *title);
++
++const char *
++window_get_title(struct window *window);
++
++void
++window_set_text_cursor_position(struct window *window, int32_t x, int32_t y);
++
++enum preferred_format {
++ WINDOW_PREFERRED_FORMAT_NONE,
++ WINDOW_PREFERRED_FORMAT_RGB565
++};
++
++void
++window_set_preferred_format(struct window *window,
++ enum preferred_format format);
++
++int
++widget_set_tooltip(struct widget *parent, char *entry, float x, float y);
++
++void
++widget_destroy_tooltip(struct widget *parent);
++
++struct widget *
++widget_add_widget(struct widget *parent, void *data);
++
++void
++widget_destroy(struct widget *widget);
++void
++widget_set_default_cursor(struct widget *widget, int cursor);
++void
++widget_get_allocation(struct widget *widget, struct rectangle *allocation);
++
++void
++widget_set_allocation(struct widget *widget,
++ int32_t x, int32_t y, int32_t width, int32_t height);
++void
++widget_set_size(struct widget *widget, int32_t width, int32_t height);
++void
++widget_set_transparent(struct widget *widget, int transparent);
++void
++widget_schedule_resize(struct widget *widget, int32_t width, int32_t height);
++
++void *
++widget_get_user_data(struct widget *widget);
++
++cairo_t *
++widget_cairo_create(struct widget *widget);
++
++struct wl_surface *
++widget_get_wl_surface(struct widget *widget);
++
++uint32_t
++widget_get_last_time(struct widget *widget);
++
++void
++widget_input_region_add(struct widget *widget, const struct rectangle *rect);
++
++void
++widget_set_redraw_handler(struct widget *widget,
++ widget_redraw_handler_t handler);
++void
++widget_set_resize_handler(struct widget *widget,
++ widget_resize_handler_t handler);
++void
++widget_set_enter_handler(struct widget *widget,
++ widget_enter_handler_t handler);
++void
++widget_set_leave_handler(struct widget *widget,
++ widget_leave_handler_t handler);
++void
++widget_set_motion_handler(struct widget *widget,
++ widget_motion_handler_t handler);
++void
++widget_set_button_handler(struct widget *widget,
++ widget_button_handler_t handler);
++void
++widget_set_touch_down_handler(struct widget *widget,
++ widget_touch_down_handler_t handler);
++void
++widget_set_touch_up_handler(struct widget *widget,
++ widget_touch_up_handler_t handler);
++void
++widget_set_touch_motion_handler(struct widget *widget,
++ widget_touch_motion_handler_t handler);
++void
++widget_set_touch_frame_handler(struct widget *widget,
++ widget_touch_frame_handler_t handler);
++void
++widget_set_touch_cancel_handler(struct widget *widget,
++ widget_touch_cancel_handler_t handler);
++void
++widget_set_axis_handler(struct widget *widget,
++ widget_axis_handler_t handler);
++void
++widget_set_pointer_frame_handler(struct widget *widget,
++ widget_pointer_frame_handler_t handler);
++void
++widget_set_axis_handlers(struct widget *widget,
++ widget_axis_handler_t axis_handler,
++ widget_axis_source_handler_t axis_source_handler,
++ widget_axis_stop_handler_t axis_stop_handler,
++ widget_axis_discrete_handler_t axis_discrete_handler);
++
++void
++window_inhibit_redraw(struct window *window);
++void
++window_uninhibit_redraw(struct window *window);
++void
++widget_schedule_redraw(struct widget *widget);
++void
++widget_set_use_cairo(struct widget *widget, int use_cairo);
++
++struct widget *
++window_frame_create(struct window *window, void *data);
++
++void
++window_frame_set_child_size(struct widget *widget, int child_width,
++ int child_height);
++
++void
++input_set_pointer_image(struct input *input, int pointer);
++
++void
++input_get_position(struct input *input, int32_t *x, int32_t *y);
++
++int
++input_get_touch(struct input *input, int32_t id, float *x, float *y);
++
++#define MOD_SHIFT_MASK 0x01
++#define MOD_ALT_MASK 0x02
++#define MOD_CONTROL_MASK 0x04
++
++uint32_t
++input_get_modifiers(struct input *input);
++
++void
++touch_grab(struct input *input, int32_t touch_id);
++
++void
++touch_ungrab(struct input *input);
++
++void
++input_grab(struct input *input, struct widget *widget, uint32_t button);
++
++void
++input_ungrab(struct input *input);
++
++struct widget *
++input_get_focus_widget(struct input *input);
++
++struct display *
++input_get_display(struct input *input);
++
++struct wl_seat *
++input_get_seat(struct input *input);
++
++struct wl_data_device *
++input_get_data_device(struct input *input);
++
++void
++input_set_selection(struct input *input,
++ struct wl_data_source *source, uint32_t time);
++
++void
++input_accept(struct input *input, const char *type);
++
++
++void
++input_receive_drag_data(struct input *input, const char *mime_type,
++ data_func_t func, void *user_data);
++int
++input_receive_drag_data_to_fd(struct input *input,
++ const char *mime_type, int fd);
++
++int
++input_receive_selection_data(struct input *input, const char *mime_type,
++ data_func_t func, void *data);
++int
++input_receive_selection_data_to_fd(struct input *input,
++ const char *mime_type, int fd);
++
++void
++output_set_user_data(struct output *output, void *data);
++
++void *
++output_get_user_data(struct output *output);
++
++void
++output_set_destroy_handler(struct output *output,
++ display_output_handler_t handler);
++
++void
++output_get_allocation(struct output *output, struct rectangle *allocation);
++
++struct wl_output *
++output_get_wl_output(struct output *output);
++
++enum wl_output_transform
++output_get_transform(struct output *output);
++
++uint32_t
++output_get_scale(struct output *output);
++
++const char *
++output_get_make(struct output *output);
++
++const char *
++output_get_model(struct output *output);
++
++void
++keysym_modifiers_add(struct wl_array *modifiers_map,
++ const char *name);
++
++xkb_mod_mask_t
++keysym_modifiers_get_mask(struct wl_array *modifiers_map,
++ const char *name);
++
++struct toytimer;
++typedef void (*toytimer_cb)(struct toytimer *);
++
++struct toytimer {
++ struct display *display;
++ struct task tsk;
++ int fd;
++ toytimer_cb callback;
++};
++
++void
++toytimer_init(struct toytimer *tt, clockid_t clock, struct display *display,
++ toytimer_cb callback);
++
++void
++toytimer_fini(struct toytimer *tt);
++
++void
++toytimer_arm(struct toytimer *tt, const struct itimerspec *its);
++
++void
++toytimer_arm_once_usec(struct toytimer *tt, uint32_t usec);
++
++void
++toytimer_disarm(struct toytimer *tt);
++
++#endif
+diff --git a/clients/window.h b/clients/window.h
+index fde5c2f..fea173f 100644
+--- a/clients/window.h
++++ b/clients/window.h
+@@ -27,721 +27,9 @@
+ #include "config.h"
+
+ #include <stdint.h>
+-#include <time.h>
+-#include <xkbcommon/xkbcommon.h>
+-#include <wayland-client.h>
+-#include <cairo.h>
++#include "toytoolkit.h"
+ #include "shared/config-parser.h"
+ #include "shared/zalloc.h"
+ #include "shared/platform.h"
+
+-struct window;
+-struct widget;
+-struct display;
+-struct input;
+-struct output;
+-
+-struct task {
+- void (*run)(struct task *task, uint32_t events);
+- struct wl_list link;
+-};
+-
+-struct rectangle {
+- int32_t x;
+- int32_t y;
+- int32_t width;
+- int32_t height;
+-};
+-
+-struct display *
+-display_create(int *argc, char *argv[]);
+-
+-void
+-display_destroy(struct display *display);
+-
+-void
+-display_set_user_data(struct display *display, void *data);
+-
+-void *
+-display_get_user_data(struct display *display);
+-
+-struct wl_display *
+-display_get_display(struct display *display);
+-
+-int
+-display_has_subcompositor(struct display *display);
+-
+-cairo_device_t *
+-display_get_cairo_device(struct display *display);
+-
+-struct wl_compositor *
+-display_get_compositor(struct display *display);
+-
+-struct output *
+-display_get_output(struct display *display);
+-
+-uint32_t
+-display_get_serial(struct display *display);
+-
+-typedef void (*display_global_handler_t)(struct display *display,
+- uint32_t name,
+- const char *interface,
+- uint32_t version, void *data);
+-
+-void
+-display_set_global_handler(struct display *display,
+- display_global_handler_t handler);
+-void
+-display_set_global_handler_remove(struct display *display,
+- display_global_handler_t remove_handler);
+-void *
+-display_bind(struct display *display, uint32_t name,
+- const struct wl_interface *interface, uint32_t version);
+-
+-typedef void (*display_output_handler_t)(struct output *output, void *data);
+-
+-/*
+- * The output configure handler is called, when a new output is connected
+- * and we know its current mode, or when the current mode changes.
+- * Test and set the output user data in your handler to know, if the
+- * output is new. Note: 'data' in the configure handler is the display
+- * user data.
+- */
+-void
+-display_set_output_configure_handler(struct display *display,
+- display_output_handler_t handler);
+-
+-struct wl_data_source *
+-display_create_data_source(struct display *display);
+-
+-#ifdef EGL_NO_DISPLAY
+-EGLDisplay
+-display_get_egl_display(struct display *d);
+-
+-EGLConfig
+-display_get_argb_egl_config(struct display *d);
+-
+-int
+-display_acquire_window_surface(struct display *display,
+- struct window *window,
+- EGLContext ctx);
+-void
+-display_release_window_surface(struct display *display,
+- struct window *window);
+-#endif
+-
+-#define SURFACE_OPAQUE 0x01
+-#define SURFACE_SHM 0x02
+-
+-#define SURFACE_HINT_RESIZE 0x10
+-
+-#define SURFACE_HINT_RGB565 0x100
+-
+-cairo_surface_t *
+-display_create_surface(struct display *display,
+- struct wl_surface *surface,
+- struct rectangle *rectangle,
+- uint32_t flags);
+-
+-struct wl_buffer *
+-display_get_buffer_for_surface(struct display *display,
+- cairo_surface_t *surface);
+-
+-struct wl_cursor_image *
+-display_get_pointer_image(struct display *display, int pointer);
+-
+-void
+-display_defer(struct display *display, struct task *task);
+-
+-void
+-display_watch_fd(struct display *display,
+- int fd, uint32_t events, struct task *task);
+-
+-void
+-display_unwatch_fd(struct display *display, int fd);
+-
+-void
+-display_run(struct display *d);
+-
+-void
+-display_exit(struct display *d);
+-
+-int
+-display_get_data_device_manager_version(struct display *d);
+-
+-enum cursor_type {
+- CURSOR_BOTTOM_LEFT,
+- CURSOR_BOTTOM_RIGHT,
+- CURSOR_BOTTOM,
+- CURSOR_DRAGGING,
+- CURSOR_LEFT_PTR,
+- CURSOR_LEFT,
+- CURSOR_RIGHT,
+- CURSOR_TOP_LEFT,
+- CURSOR_TOP_RIGHT,
+- CURSOR_TOP,
+- CURSOR_IBEAM,
+- CURSOR_HAND1,
+- CURSOR_WATCH,
+- CURSOR_DND_MOVE,
+- CURSOR_DND_COPY,
+- CURSOR_DND_FORBIDDEN,
+-
+- CURSOR_BLANK
+-};
+-
+-typedef void (*window_key_handler_t)(struct window *window, struct input *input,
+- uint32_t time, uint32_t key, uint32_t unicode,
+- enum wl_keyboard_key_state state, void *data);
+-
+-typedef void (*window_keyboard_focus_handler_t)(struct window *window,
+- struct input *device, void *data);
+-
+-typedef void (*window_data_handler_t)(struct window *window,
+- struct input *input,
+- float x, float y,
+- const char **types,
+- void *data);
+-
+-typedef void (*window_drop_handler_t)(struct window *window,
+- struct input *input,
+- int32_t x, int32_t y, void *data);
+-
+-typedef void (*window_close_handler_t)(void *data);
+-typedef void (*window_fullscreen_handler_t)(struct window *window, void *data);
+-
+-typedef void (*window_output_handler_t)(struct window *window, struct output *output,
+- int enter, void *data);
+-typedef void (*window_state_changed_handler_t)(struct window *window,
+- void *data);
+-
+-
+-typedef void (*window_locked_pointer_motion_handler_t)(struct window *window,
+- struct input *input,
+- uint32_t time,
+- float x, float y,
+- void *data);
+-
+-typedef void (*locked_pointer_locked_handler_t)(struct window *window,
+- struct input *input,
+- void *data);
+-
+-typedef void (*locked_pointer_unlocked_handler_t)(struct window *window,
+- struct input *input,
+- void *data);
+-
+-typedef void (*confined_pointer_confined_handler_t)(struct window *window,
+- struct input *input,
+- void *data);
+-
+-typedef void (*confined_pointer_unconfined_handler_t)(struct window *window,
+- struct input *input,
+- void *data);
+-
+-typedef void (*widget_resize_handler_t)(struct widget *widget,
+- int32_t width, int32_t height,
+- void *data);
+-typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data);
+-
+-typedef int (*widget_enter_handler_t)(struct widget *widget,
+- struct input *input,
+- float x, float y, void *data);
+-typedef void (*widget_leave_handler_t)(struct widget *widget,
+- struct input *input, void *data);
+-typedef int (*widget_motion_handler_t)(struct widget *widget,
+- struct input *input, uint32_t time,
+- float x, float y, void *data);
+-typedef void (*widget_button_handler_t)(struct widget *widget,
+- struct input *input, uint32_t time,
+- uint32_t button,
+- enum wl_pointer_button_state state,
+- void *data);
+-typedef void (*widget_touch_down_handler_t)(struct widget *widget,
+- struct input *input,
+- uint32_t serial,
+- uint32_t time,
+- int32_t id,
+- float x,
+- float y,
+- void *data);
+-typedef void (*widget_touch_up_handler_t)(struct widget *widget,
+- struct input *input,
+- uint32_t serial,
+- uint32_t time,
+- int32_t id,
+- void *data);
+-typedef void (*widget_touch_motion_handler_t)(struct widget *widget,
+- struct input *input,
+- uint32_t time,
+- int32_t id,
+- float x,
+- float y,
+- void *data);
+-typedef void (*widget_touch_frame_handler_t)(struct widget *widget,
+- struct input *input, void *data);
+-typedef void (*widget_touch_cancel_handler_t)(struct widget *widget,
+- struct input *input, void *data);
+-typedef void (*widget_axis_handler_t)(struct widget *widget,
+- struct input *input, uint32_t time,
+- uint32_t axis,
+- wl_fixed_t value,
+- void *data);
+-
+-typedef void (*widget_pointer_frame_handler_t)(struct widget *widget,
+- struct input *input,
+- void *data);
+-
+-typedef void (*widget_axis_source_handler_t)(struct widget *widget,
+- struct input *input,
+- uint32_t source,
+- void *data);
+-
+-typedef void (*widget_axis_stop_handler_t)(struct widget *widget,
+- struct input *input,
+- uint32_t time,
+- uint32_t axis,
+- void *data);
+-
+-typedef void (*widget_axis_discrete_handler_t)(struct widget *widget,
+- struct input *input,
+- uint32_t axis,
+- int32_t discrete,
+- void *data);
+-
+-struct window *
+-window_create(struct display *display);
+-struct window *
+-window_create_custom(struct display *display);
+-
+-void
+-window_set_parent(struct window *window, struct window *parent_window);
+-struct window *
+-window_get_parent(struct window *window);
+-
+-int
+-window_has_focus(struct window *window);
+-
+-typedef void (*menu_func_t)(void *data, struct input *input, int index);
+-
+-void
+-window_show_menu(struct display *display,
+- struct input *input, uint32_t time, struct window *parent,
+- int32_t x, int32_t y,
+- menu_func_t func, const char **entries, int count);
+-
+-void
+-window_show_frame_menu(struct window *window,
+- struct input *input, uint32_t time);
+-
+-int
+-window_get_buffer_transform(struct window *window);
+-
+-void
+-window_set_buffer_transform(struct window *window,
+- enum wl_output_transform transform);
+-
+-uint32_t
+-window_get_buffer_scale(struct window *window);
+-
+-void
+-window_set_buffer_scale(struct window *window,
+- int32_t scale);
+-
+-uint32_t
+-window_get_output_scale(struct window *window);
+-
+-void
+-window_destroy(struct window *window);
+-
+-struct widget *
+-window_add_widget(struct window *window, void *data);
+-
+-enum subsurface_mode {
+- SUBSURFACE_SYNCHRONIZED,
+- SUBSURFACE_DESYNCHRONIZED
+-};
+-
+-struct widget *
+-window_add_subsurface(struct window *window, void *data,
+- enum subsurface_mode default_mode);
+-
+-typedef void (*data_func_t)(void *data, size_t len,
+- int32_t x, int32_t y, void *user_data);
+-
+-struct display *
+-window_get_display(struct window *window);
+-void
+-window_move(struct window *window, struct input *input, uint32_t time);
+-void
+-window_get_allocation(struct window *window, struct rectangle *allocation);
+-void
+-window_schedule_redraw(struct window *window);
+-void
+-window_schedule_resize(struct window *window, int width, int height);
+-
+-int
+-window_lock_pointer(struct window *window, struct input *input);
+-
+-void
+-window_unlock_pointer(struct window *window);
+-
+-void
+-widget_set_locked_pointer_cursor_hint(struct widget *widget,
+- float x, float y);
+-
+-int
+-window_confine_pointer_to_rectangles(struct window *window,
+- struct input *input,
+- struct rectangle *rectangles,
+- int num_rectangles);
+-
+-void
+-window_update_confine_rectangles(struct window *window,
+- struct rectangle *rectangles,
+- int num_rectangles);
+-
+-int
+-window_confine_pointer_to_widget(struct window *window,
+- struct widget *widget,
+- struct input *input);
+-
+-void
+-window_unconfine_pointer(struct window *window);
+-
+-cairo_surface_t *
+-window_get_surface(struct window *window);
+-
+-struct wl_surface *
+-window_get_wl_surface(struct window *window);
+-
+-struct wl_subsurface *
+-widget_get_wl_subsurface(struct widget *widget);
+-
+-enum window_buffer_type {
+- WINDOW_BUFFER_TYPE_EGL_WINDOW,
+- WINDOW_BUFFER_TYPE_SHM,
+-};
+-
+-void
+-display_surface_damage(struct display *display, cairo_surface_t *cairo_surface,
+- int32_t x, int32_t y, int32_t width, int32_t height);
+-
+-void
+-window_set_buffer_type(struct window *window, enum window_buffer_type type);
+-
+-enum window_buffer_type
+-window_get_buffer_type(struct window *window);
+-
+-int
+-window_is_fullscreen(struct window *window);
+-
+-void
+-window_set_fullscreen(struct window *window, int fullscreen);
+-
+-int
+-window_is_maximized(struct window *window);
+-
+-void
+-window_set_maximized(struct window *window, int maximized);
+-
+-int
+-window_is_resizing(struct window *window);
+-
+-void
+-window_set_minimized(struct window *window);
+-
+-void
+-window_set_user_data(struct window *window, void *data);
+-
+-void *
+-window_get_user_data(struct window *window);
+-
+-void
+-window_set_key_handler(struct window *window,
+- window_key_handler_t handler);
+-
+-void
+-window_set_keyboard_focus_handler(struct window *window,
+- window_keyboard_focus_handler_t handler);
+-
+-void
+-window_set_data_handler(struct window *window,
+- window_data_handler_t handler);
+-
+-void
+-window_set_drop_handler(struct window *window,
+- window_drop_handler_t handler);
+-
+-void
+-window_set_close_handler(struct window *window,
+- window_close_handler_t handler);
+-void
+-window_set_fullscreen_handler(struct window *window,
+- window_fullscreen_handler_t handler);
+-void
+-window_set_output_handler(struct window *window,
+- window_output_handler_t handler);
+-void
+-window_set_state_changed_handler(struct window *window,
+- window_state_changed_handler_t handler);
+-
+-void
+-window_set_pointer_locked_handler(struct window *window,
+- locked_pointer_locked_handler_t locked,
+- locked_pointer_unlocked_handler_t unlocked);
+-
+-void
+-window_set_pointer_confined_handler(struct window *window,
+- confined_pointer_confined_handler_t confined,
+- confined_pointer_unconfined_handler_t unconfined);
+-
+-void
+-window_set_locked_pointer_motion_handler(
+- struct window *window, window_locked_pointer_motion_handler_t handler);
+-
+-void
+-window_set_title(struct window *window, const char *title);
+-
+-const char *
+-window_get_title(struct window *window);
+-
+-void
+-window_set_text_cursor_position(struct window *window, int32_t x, int32_t y);
+-
+-enum preferred_format {
+- WINDOW_PREFERRED_FORMAT_NONE,
+- WINDOW_PREFERRED_FORMAT_RGB565
+-};
+-
+-void
+-window_set_preferred_format(struct window *window,
+- enum preferred_format format);
+-
+-int
+-widget_set_tooltip(struct widget *parent, char *entry, float x, float y);
+-
+-void
+-widget_destroy_tooltip(struct widget *parent);
+-
+-struct widget *
+-widget_add_widget(struct widget *parent, void *data);
+-
+-void
+-widget_destroy(struct widget *widget);
+-void
+-widget_set_default_cursor(struct widget *widget, int cursor);
+-void
+-widget_get_allocation(struct widget *widget, struct rectangle *allocation);
+-
+-void
+-widget_set_allocation(struct widget *widget,
+- int32_t x, int32_t y, int32_t width, int32_t height);
+-void
+-widget_set_size(struct widget *widget, int32_t width, int32_t height);
+-void
+-widget_set_transparent(struct widget *widget, int transparent);
+-void
+-widget_schedule_resize(struct widget *widget, int32_t width, int32_t height);
+-
+-void *
+-widget_get_user_data(struct widget *widget);
+-
+-cairo_t *
+-widget_cairo_create(struct widget *widget);
+-
+-struct wl_surface *
+-widget_get_wl_surface(struct widget *widget);
+-
+-uint32_t
+-widget_get_last_time(struct widget *widget);
+-
+-void
+-widget_input_region_add(struct widget *widget, const struct rectangle *rect);
+-
+-void
+-widget_set_redraw_handler(struct widget *widget,
+- widget_redraw_handler_t handler);
+-void
+-widget_set_resize_handler(struct widget *widget,
+- widget_resize_handler_t handler);
+-void
+-widget_set_enter_handler(struct widget *widget,
+- widget_enter_handler_t handler);
+-void
+-widget_set_leave_handler(struct widget *widget,
+- widget_leave_handler_t handler);
+-void
+-widget_set_motion_handler(struct widget *widget,
+- widget_motion_handler_t handler);
+-void
+-widget_set_button_handler(struct widget *widget,
+- widget_button_handler_t handler);
+-void
+-widget_set_touch_down_handler(struct widget *widget,
+- widget_touch_down_handler_t handler);
+-void
+-widget_set_touch_up_handler(struct widget *widget,
+- widget_touch_up_handler_t handler);
+-void
+-widget_set_touch_motion_handler(struct widget *widget,
+- widget_touch_motion_handler_t handler);
+-void
+-widget_set_touch_frame_handler(struct widget *widget,
+- widget_touch_frame_handler_t handler);
+-void
+-widget_set_touch_cancel_handler(struct widget *widget,
+- widget_touch_cancel_handler_t handler);
+-void
+-widget_set_axis_handler(struct widget *widget,
+- widget_axis_handler_t handler);
+-void
+-widget_set_pointer_frame_handler(struct widget *widget,
+- widget_pointer_frame_handler_t handler);
+-void
+-widget_set_axis_handlers(struct widget *widget,
+- widget_axis_handler_t axis_handler,
+- widget_axis_source_handler_t axis_source_handler,
+- widget_axis_stop_handler_t axis_stop_handler,
+- widget_axis_discrete_handler_t axis_discrete_handler);
+-
+-void
+-window_inhibit_redraw(struct window *window);
+-void
+-window_uninhibit_redraw(struct window *window);
+-void
+-widget_schedule_redraw(struct widget *widget);
+-void
+-widget_set_use_cairo(struct widget *widget, int use_cairo);
+-
+-struct widget *
+-window_frame_create(struct window *window, void *data);
+-
+-void
+-window_frame_set_child_size(struct widget *widget, int child_width,
+- int child_height);
+-
+-void
+-input_set_pointer_image(struct input *input, int pointer);
+-
+-void
+-input_get_position(struct input *input, int32_t *x, int32_t *y);
+-
+-int
+-input_get_touch(struct input *input, int32_t id, float *x, float *y);
+-
+-#define MOD_SHIFT_MASK 0x01
+-#define MOD_ALT_MASK 0x02
+-#define MOD_CONTROL_MASK 0x04
+-
+-uint32_t
+-input_get_modifiers(struct input *input);
+-
+-void
+-touch_grab(struct input *input, int32_t touch_id);
+-
+-void
+-touch_ungrab(struct input *input);
+-
+-void
+-input_grab(struct input *input, struct widget *widget, uint32_t button);
+-
+-void
+-input_ungrab(struct input *input);
+-
+-struct widget *
+-input_get_focus_widget(struct input *input);
+-
+-struct display *
+-input_get_display(struct input *input);
+-
+-struct wl_seat *
+-input_get_seat(struct input *input);
+-
+-struct wl_data_device *
+-input_get_data_device(struct input *input);
+-
+-void
+-input_set_selection(struct input *input,
+- struct wl_data_source *source, uint32_t time);
+-
+-void
+-input_accept(struct input *input, const char *type);
+-
+-
+-void
+-input_receive_drag_data(struct input *input, const char *mime_type,
+- data_func_t func, void *user_data);
+-int
+-input_receive_drag_data_to_fd(struct input *input,
+- const char *mime_type, int fd);
+-
+-int
+-input_receive_selection_data(struct input *input, const char *mime_type,
+- data_func_t func, void *data);
+-int
+-input_receive_selection_data_to_fd(struct input *input,
+- const char *mime_type, int fd);
+-
+-void
+-output_set_user_data(struct output *output, void *data);
+-
+-void *
+-output_get_user_data(struct output *output);
+-
+-void
+-output_set_destroy_handler(struct output *output,
+- display_output_handler_t handler);
+-
+-void
+-output_get_allocation(struct output *output, struct rectangle *allocation);
+-
+-struct wl_output *
+-output_get_wl_output(struct output *output);
+-
+-enum wl_output_transform
+-output_get_transform(struct output *output);
+-
+-uint32_t
+-output_get_scale(struct output *output);
+-
+-const char *
+-output_get_make(struct output *output);
+-
+-const char *
+-output_get_model(struct output *output);
+-
+-void
+-keysym_modifiers_add(struct wl_array *modifiers_map,
+- const char *name);
+-
+-xkb_mod_mask_t
+-keysym_modifiers_get_mask(struct wl_array *modifiers_map,
+- const char *name);
+-
+-struct toytimer;
+-typedef void (*toytimer_cb)(struct toytimer *);
+-
+-struct toytimer {
+- struct display *display;
+- struct task tsk;
+- int fd;
+- toytimer_cb callback;
+-};
+-
+-void
+-toytimer_init(struct toytimer *tt, clockid_t clock, struct display *display,
+- toytimer_cb callback);
+-
+-void
+-toytimer_fini(struct toytimer *tt);
+-
+-void
+-toytimer_arm(struct toytimer *tt, const struct itimerspec *its);
+-
+-void
+-toytimer_arm_once_usec(struct toytimer *tt, uint32_t usec);
+-
+-void
+-toytimer_disarm(struct toytimer *tt);
+-
+ #endif
+diff --git a/configure.ac b/configure.ac
+index 96acf75..d3fa5af 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,7 +82,7 @@ AC_PROG_SED
+
+ # Initialize libtool
+ LT_PREREQ([2.2])
+-LT_INIT([disable-static])
++LT_INIT([shared static])
+
+ AC_ARG_VAR([WESTON_NATIVE_BACKEND],
+ [Set the native backend to use, if Weston is not running under Wayland nor X11. @<:@default=drm-backend.so@:>@])
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch
new file mode 100644
index 00000000..bf3ef82c
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0003-add-window-set-fullscreen-at-output.patch
@@ -0,0 +1,96 @@
+From 91ccb8d7fa92a55fd3d14da8f7fa883e951ae49a Mon Sep 17 00:00:00 2001
+From: Valentine Barshak <valentine.barshak@cogentembedded.com>
+Date: Wed, 6 Mar 2019 00:17:31 +0300
+Subject: [PATCH 3/7] add window_set_fullscreen_at_output
+
+---
+ clients/toytoolkit.h | 9 +++++++++
+ clients/window.c | 38 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 47 insertions(+)
+
+diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h
+index 1c0b77d..2bcecc1 100644
+--- a/clients/toytoolkit.h
++++ b/clients/toytoolkit.h
+@@ -74,6 +74,12 @@ display_get_compositor(struct display *display);
+ struct output *
+ display_get_output(struct display *display);
+
++unsigned int
++display_get_outputs_number(struct display *display);
++
++struct output *
++display_get_output_by_index(struct display *display, unsigned int index);
++
+ uint32_t
+ display_get_serial(struct display *display);
+
+@@ -432,6 +438,9 @@ window_is_fullscreen(struct window *window);
+ void
+ window_set_fullscreen(struct window *window, int fullscreen);
+
++void
++window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output);
++
+ int
+ window_is_maximized(struct window *window);
+
+diff --git a/clients/window.c b/clients/window.c
+index b64e96c..43f20e2 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -4597,6 +4597,21 @@ window_set_fullscreen(struct window *window, int fullscreen)
+ zxdg_toplevel_v6_unset_fullscreen(window->xdg_toplevel);
+ }
+
++void
++window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output)
++{
++ if (!window->xdg_toplevel)
++ return;
++
++ if (window->fullscreen == fullscreen)
++ return;
++
++ if (fullscreen)
++ zxdg_toplevel_v6_set_fullscreen(window->xdg_toplevel, output ? output_get_wl_output(output) : NULL);
++ else
++ zxdg_toplevel_v6_unset_fullscreen(window->xdg_toplevel);
++}
++
+ int
+ window_is_maximized(struct window *window)
+ {
+@@ -6328,6 +6343,29 @@ display_get_output(struct display *display)
+ return container_of(display->output_list.next, struct output, link);
+ }
+
++unsigned int
++display_get_outputs_number(struct display *display)
++{
++ return wl_list_length(&display->output_list);
++}
++
++struct output *
++display_get_output_by_index(struct display *display, unsigned int index)
++{
++ int i;
++ int n = wl_list_length(&display->output_list);
++ struct wl_list *item;
++
++ if (index >= n)
++ return NULL;
++
++ item = display->output_list.next;
++ for (i = 0; i < index; i++)
++ item = item->next;
++
++ return container_of(item, struct output, link);
++}
++
+ struct wl_compositor *
+ display_get_compositor(struct display *display)
+ {
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch
new file mode 100644
index 00000000..b171271a
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0004-Add-display_poll-function.patch
@@ -0,0 +1,90 @@
+From 5dfdbc46524919521c9b3cc485100a54c0908016 Mon Sep 17 00:00:00 2001
+From: Valentine Barshak <valentine.barshak@cogentembedded.com>
+Date: Wed, 6 Mar 2019 00:19:06 +0300
+Subject: [PATCH 4/7] Add display_poll function
+
+---
+ clients/toytoolkit.h | 3 +++
+ clients/window.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 55 insertions(+)
+
+diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h
+index 2bcecc1..a77eda3 100644
+--- a/clients/toytoolkit.h
++++ b/clients/toytoolkit.h
+@@ -163,6 +163,9 @@ display_unwatch_fd(struct display *display, int fd);
+ void
+ display_run(struct display *d);
+
++int
++display_poll(struct display *display, int timeout);
++
+ void
+ display_exit(struct display *d);
+
+diff --git a/clients/window.c b/clients/window.c
+index 43f20e2..9cd0e8e 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -6490,6 +6490,58 @@ display_run(struct display *display)
+ }
+ }
+
++int
++display_poll(struct display *display, int timeout)
++{
++ struct task *task;
++ struct epoll_event ep[16];
++ int i, count, ret;
++
++ display->running = 1;
++ while (!wl_list_empty(&display->deferred_list)) {
++ task = container_of(display->deferred_list.prev,
++ struct task, link);
++ wl_list_remove(&task->link);
++ task->run(task, 0);
++ }
++
++ /* ...prepare for a reading */
++ while (wl_display_prepare_read(display->display) != 0)
++ {
++ /* ...dispatch all pending events and repeat attempt */
++ wl_display_dispatch_pending(display->display);
++ }
++
++ /* ...flush all outstanding commands to a display */
++ if (wl_display_flush(display->display) < 0) {
++ return -1;
++ }
++
++ if (!display->running)
++ return -1;
++
++ count = epoll_wait(display->epoll_fd, ep, ARRAY_LENGTH(ep), timeout);
++ if (!count) {
++ wl_display_cancel_read(display->display);
++ return 0;
++ }
++
++ if (count > 0) {
++ /* ...read display events (if any) before we do any drawing */
++ if (wl_display_read_events(display->display) < 0) {
++ return -1;
++ }
++
++ /* ...process pending display events (if any) */
++ if (wl_display_dispatch_pending(display->display) < 0) {
++ return -1;
++ }
++ } else if (count < 0) {
++ wl_display_cancel_read(display->display);
++ return count;
++ }
++}
++
+ void
+ display_exit(struct display *display)
+ {
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch
new file mode 100644
index 00000000..563f2a2a
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0005-Add-wl-ivi-shell-surface-creating-support.patch
@@ -0,0 +1,56 @@
+From 5009db4e22545def833be7e2946419d209026bd6 Mon Sep 17 00:00:00 2001
+From: Grigory Kletsko <grigory.kletsko@cogentembedded.com>
+Date: Tue, 13 Jun 2017 23:58:37 +0300
+Subject: [PATCH 5/7] Add wl ivi shell surface creating support
+
+---
+ ivi-shell/ivi-layout-export.h | 19 +++++++++++++++++++
+ ivi-shell/ivi-layout.c | 2 ++
+ 2 files changed, 21 insertions(+)
+
+diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
+index 016d8b5..29d84dc 100644
+--- a/ivi-shell/ivi-layout-export.h
++++ b/ivi-shell/ivi-layout-export.h
+@@ -154,6 +154,25 @@ struct ivi_layout_interface {
+ */
+ int32_t (*commit_changes)(void);
+
++ /**
++ * \brief Creates an ivi_layout_surface.
++ *
++ * \return IVI_SUCCEEDED if the method call was successful
++ * \return IVI_FAILED if the method call was failed
++ */
++ struct ivi_layout_surface* (*surface_create)(
++ struct weston_surface *wl_surface,
++ uint32_t id_surface);
++
++ /**
++ * \brief Configure an ivi_layout_surface
++ *
++ * \return IVI_SUCCEEDED if the method call was successful
++ * \return IVI_FAILED if the method call was failed
++ */
++ void (*surface_configure)(struct ivi_layout_surface *ivisurf,
++ int32_t width, int32_t height);
++
+ /**
+ * surface controller interface
+ */
+diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
+index d9a0c2d..968819f 100644
+--- a/ivi-shell/ivi-layout.c
++++ b/ivi-shell/ivi-layout.c
+@@ -1950,6 +1950,8 @@ static struct ivi_layout_interface ivi_layout_interface = {
+ * commit all changes
+ */
+ .commit_changes = ivi_layout_commit_changes,
++ .surface_create = ivi_layout_surface_create,
++ .surface_configure = ivi_layout_surface_configure,
+
+ /**
+ * surface controller interfaces
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch
new file mode 100644
index 00000000..21f68ce5
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0006-Add-widget_set_surface_allocation-func.patch
@@ -0,0 +1,50 @@
+From a74be0a8f1b71ae24e43e337d44f215d33fe012c Mon Sep 17 00:00:00 2001
+From: Grigory Kletsko <grigory.kletsko@cogentembedded.com>
+Date: Tue, 13 Dec 2016 00:43:11 +0300
+Subject: [PATCH 6/7] Add widget_set_surface_allocation func
+
+---
+ clients/toytoolkit.h | 3 +++
+ clients/window.c | 12 ++++++++++++
+ 2 files changed, 15 insertions(+)
+
+diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h
+index a77eda3..0f6145d 100644
+--- a/clients/toytoolkit.h
++++ b/clients/toytoolkit.h
+@@ -543,6 +543,9 @@ void
+ widget_set_allocation(struct widget *widget,
+ int32_t x, int32_t y, int32_t width, int32_t height);
+ void
++widget_set_surface_allocation(struct widget *widget,
++ int32_t x, int32_t y, int32_t width, int32_t height);
++void
+ widget_set_size(struct widget *widget, int32_t width, int32_t height);
+ void
+ widget_set_transparent(struct widget *widget, int transparent);
+diff --git a/clients/window.c b/clients/window.c
+index 9cd0e8e..d0e2ece 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -1744,6 +1744,18 @@ widget_set_allocation(struct widget *widget,
+ }
+
+ void
++widget_set_surface_allocation(struct widget *widget,
++ int32_t x, int32_t y, int32_t width, int32_t height)
++{
++ if (widget->surface) {
++ widget->surface->allocation.x = x;
++ widget->surface->allocation.y = y;
++ widget->surface->allocation.width = width;
++ widget->surface->allocation.height = height;
++ }
++}
++
++void
+ widget_set_transparent(struct widget *widget, int transparent)
+ {
+ widget->opaque = !transparent;
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch
new file mode 100644
index 00000000..86daf5c4
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-5.0.0/0007-Add-call-for-setting-fullscreen-with-IVI.patch
@@ -0,0 +1,44 @@
+From 48c11b3d668383cb964fa41a73e6b666f30fea57 Mon Sep 17 00:00:00 2001
+From: Grigory Kletsko <grigory.kletsko@cogentembedded.com>
+Date: Tue, 13 Dec 2016 18:20:11 +0300
+Subject: [PATCH 7/7] Add call for setting fullscreen with IVI
+
+---
+ clients/toytoolkit.h | 3 +++
+ clients/window.c | 6 ++++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/clients/toytoolkit.h b/clients/toytoolkit.h
+index 0f6145d..7058c41 100644
+--- a/clients/toytoolkit.h
++++ b/clients/toytoolkit.h
+@@ -444,6 +444,9 @@ window_set_fullscreen(struct window *window, int fullscreen);
+ void
+ window_set_fullscreen_at_output(struct window *window, int fullscreen, struct output *output);
+
++void
++window_set_fullscreen_hack(struct window *window, int fullscreen);
++
+ int
+ window_is_maximized(struct window *window);
+
+diff --git a/clients/window.c b/clients/window.c
+index d0e2ece..81fb674 100644
+--- a/clients/window.c
++++ b/clients/window.c
+@@ -4624,6 +4624,12 @@ window_set_fullscreen_at_output(struct window *window, int fullscreen, struct ou
+ zxdg_toplevel_v6_unset_fullscreen(window->xdg_toplevel);
+ }
+
++void
++window_set_fullscreen_hack(struct window *window, int fullscreen)
++{
++ window->fullscreen = fullscreen;
++}
++
+ int
+ window_is_maximized(struct window *window)
+ {
+--
+2.7.4
+
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 00000000..35bafac2
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append = " \
+ file://weston_exp.sh \
+"
+
+# Add Weston configuration script
+do_install_append() {
+ install -d ${D}/etc/profile.d
+ install -m 0755 ${WORKDIR}/weston_exp.sh ${D}/etc/profile.d
+}
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init/weston_exp.sh b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init/weston_exp.sh
new file mode 100755
index 00000000..18be2ad4
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston-init/weston_exp.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+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
+
+export QT_QPA_PLATFORM=wayland
diff --git a/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend
new file mode 100644
index 00000000..96e48aba
--- /dev/null
+++ b/bsp/meta-rcar/meta-rcar-gen3-adas/recipes-graphics/wayland/weston_5.0.0.bbappend
@@ -0,0 +1,13 @@
+FILESEXTRAPATHS_prepend := '${THISDIR}/${PN}-${PV}:'
+
+SRC_URI_append = " \
+ file://0001-Allow-to-boot-without-input-device.patch \
+ file://0002-Share-toytoolkit-lib.patch \
+ file://0003-add-window-set-fullscreen-at-output.patch \
+ file://0004-Add-display_poll-function.patch \
+ file://0005-Add-wl-ivi-shell-surface-creating-support.patch \
+ file://0006-Add-widget_set_surface_allocation-func.patch \
+ file://0007-Add-call-for-setting-fullscreen-with-IVI.patch \
+"
+
+FILES_${PN} += " ${libdir}/libweston-toytoolkit*"