summaryrefslogtreecommitdiffstats
path: root/meta-agl-core/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta-agl-core/recipes-graphics')
-rw-r--r--meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf34
-rw-r--r--meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb28
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb34
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch51
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch55
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch70
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend7
-rw-r--r--meta-agl-core/recipes-graphics/wayland/waltham_git.bb16
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb41
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend12
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg4
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg5
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg3
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual.cfg18
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-init.bbappend1
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc6
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch30
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch106
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch37
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend1
-rw-r--r--meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc11
23 files changed, 582 insertions, 0 deletions
diff --git a/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf b/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
new file mode 100644
index 000000000..bbd5a80c4
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/Readme.weston-ini-conf
@@ -0,0 +1,34 @@
+##Generate a weston.ini file:
+
+To modify any of the default sections (core, shell, ivi-shell), add a
+do_configure() function to your bbappend:
+
+'''
+do_configure() {
+ echo repaint-window=34 >> ${WORKDIR}/core.cfg
+
+ echo transition-duration=300 >> ${WORKDIR}/ivishell.cfg
+ echo cursor-theme=default >> ${WORKDIR}/ivishell.cfg
+}
+'''
+or:
+'''
+do_configure() {
+ sed -i -e 's/drm-backend/fbdev-backend/' ${WORKDIR}/core.cfg
+}
+'''
+
+To change the display from the default assumption of an HDMI-1-A connected
+screen that needs to be rotated 270 degrees:
+
+'''
+SRC_URI_remove = "file://hdmi-a-1-270.cfg"
+SRC_URI += "file://hdmi-a-1-90.cfg"
+'''
+
+To add new sections just list them in SRC_URI:
+'''
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://dsi.cfg"
+'''
diff --git a/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
new file mode 100644
index 000000000..553f3a6bf
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/agl-compositor_git.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Reference Wayland compositor for AGL"
+DESCRIPTION = "The AGL compositor is a reference Wayland server for Automotive \
+Grade Linux, using libweston as a base to provide a graphical environment for \
+the automotive environment."
+
+HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/q/project:src%252Fagl-compositor"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fac6abe0003c4d142ff8fa1f18316df0"
+
+DEPENDS = "wayland wayland-protocols wayland-native weston"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/agl-compositor.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "bdd8dd718496dc8e4330209c46c196442bcf7d3e"
+
+PV = "0.0.10+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG[policy-deny-all] = "-Dpolicy-default=deny-all,,"
+
+inherit meson pkgconfig python3native
+
+FILES_${PN} = " \
+ ${bindir}/agl-compositor \
+ ${bindir}/agl-screenshooter \
+ ${datadir}/${PN}/protocols/agl-shell.xml \
+ ${datadir}/${PN}/protocols/agl-shell-desktop.xml \
+ "
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb b/meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb
new file mode 100644
index 000000000..85f760709
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham-transmitter_git.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise"
+HOMEPAGE = "https://github.com/waltham/waltham"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://waltham-transmitter/COPYING;md5=f21c9af4de068fb53b83f0b37d262ec3"
+
+DEPENDS += "libdrm virtual/kernel wayland wayland-native waltham weston gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad wayland-ivi-extension"
+
+SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/weston-ivi-plugins.git;protocol=https;branch=${AGL_BRANCH}"
+SRCREV = "5287483228fa1e28f3217a54606cfe760c6582bd"
+
+S = "${WORKDIR}/git/"
+
+WALTHAM_PIPELINE_TRANSMITTER ?= "waltham-transmitter/waltham-renderer/pipeline_example_general.cfg"
+WALTHAM_PIPELINE_RECEIVER ?= "waltham-receiver/receiver_pipeline_example_general.cfg"
+WALTHAM_RECIEVER_IP ?= "192.168.1.2"
+WALTHAM_RECEIVER_PORT ?= "3440"
+
+inherit pkgconfig cmake
+
+do_install_append () {
+ install -d ${D}/etc/xdg/weston/
+ install ${S}/${WALTHAM_PIPELINE_TRANSMITTER} ${D}/etc/xdg/weston/transmitter_pipeline.cfg
+ install ${S}/${WALTHAM_PIPELINE_RECEIVER} ${D}/etc/xdg/weston/receiver_pipeline.cfg
+
+ sed -i -e "s/YOUR_RECIEVER_IP/${WALTHAM_RECIEVER_IP}/g" ${D}/etc/xdg/weston/transmitter_pipeline.cfg
+ sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/transmitter_pipeline.cfg
+ sed -i -e "s/YOUR_RECIEVER_PORT/${WALTHAM_RECEIVER_PORT}/g" ${D}/etc/xdg/weston/receiver_pipeline.cfg
+
+}
+
+FILES_${PN} += "/etc/xdg/weston/*.cfg"
+FILES_${PN} += "${libdir}/*"
+FILES_${PN} += "${bindir}/*"
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch
new file mode 100644
index 000000000..32c2df3c4
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham/0001-Use-python3-instead-of-2.patch
@@ -0,0 +1,51 @@
+From 6ecdf10a10929164f3cbdb754ae91d27576e5036 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Fri, 16 Oct 2020 18:57:38 +0300
+Subject: [PATCH] Use python3 instead of 2
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ configure.ac | 2 +-
+ tools/gen.py | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5f65a6b..94b8644 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,7 +32,7 @@ AC_SUBST(VERSION_INFO)
+ # Check for programs
+ AC_PROG_CC
+ AC_PROG_CC_STDC
+-AC_CHECK_PROGS([PYTHON2], [python2 python])
++AC_CHECK_PROGS([PYTHON3], [python3 python])
+ PKG_PROG_PKG_CONFIG()
+
+ AC_ARG_ENABLE(gprof,
+diff --git a/tools/gen.py b/tools/gen.py
+index 19e8baa..64c5870 100755
+--- a/tools/gen.py
++++ b/tools/gen.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python2
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*-
+
+ # Copyright © 2013-2014 Collabora, Ltd.
+@@ -562,11 +562,11 @@ try:
+ opts, args = getopt.getopt(sys.argv[1:], "hp:i:o:t:m:",
+ ["preamble=", "input=", "output=", "type=", "mode="])
+ except getopt.GetoptError:
+- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>'
++ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>')
+ sys.exit(2)
+ for opt, arg in opts:
+ if opt == '-h':
+- print 'gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>'
++ print('gen.py -p <preamblefile> -i <inputfile> -o <outputfile> -t <type> -m <mode>')
+ sys.exit()
+ elif opt in ("-p", "--preamble"):
+ preamble_files.append(arg)
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch
new file mode 100644
index 000000000..354bcbc15
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham/0001-waltham-Fix-compile-build-error.patch
@@ -0,0 +1,55 @@
+From cc87dddc2cdc0c20b053e3da1197efd671b4f50c Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Wed, 23 Sep 2020 22:33:50 +0300
+Subject: [PATCH 1/2] waltham: Fix compile build error
+
+Newer compilers will complain about the fact debug_message is declared
+multiple times:
+
+multiple definition of `debug_message';
+.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+first defined here multiple definition of `debug_message';
+.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+first defined here /usr/bin/ld:
+.libs/client-serialice.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+multiple definition of `debug_message';
+.libs/marshaller.o:/home/mvlad/src/native-agl-weston8/waltham/waltham/src/waltham/marshaller_log.h:35:
+first defined here
+
+Bug-AGL: SPEC-3649
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ src/waltham/marshaller_log.h | 2 +-
+ src/waltham/waltham-util.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/waltham/marshaller_log.h b/src/waltham/marshaller_log.h
+index 8254914..ffa87c1 100644
+--- a/src/waltham/marshaller_log.h
++++ b/src/waltham/marshaller_log.h
+@@ -32,7 +32,7 @@
+ /* Comment/uncomment to disable/enable debugging log */
+ #define DEBUG
+ //#define PROFILE
+-int debug_message;
++extern int debug_message;
+
+ #ifdef DEBUG
+ static inline void DEBUG_STAMP (void) {
+diff --git a/src/waltham/waltham-util.c b/src/waltham/waltham-util.c
+index 410b114..8f898f8 100644
+--- a/src/waltham/waltham-util.c
++++ b/src/waltham/waltham-util.c
+@@ -34,7 +34,7 @@
+ #include "waltham-connection.h"
+ #include "waltham-private.h"
+
+-int debug_message;
++extern int debug_message;
+
+ static void
+ wth_pfx_print(const char *pfx, const char *fmt, va_list argp)
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch b/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch
new file mode 100644
index 000000000..5aefb922b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham/0002-commandxml-Add-support-wthp_app_id-interface.patch
@@ -0,0 +1,70 @@
+From d30005429fe92daa14151c2a6175d5cf19506cac Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Wed, 7 Oct 2020 16:36:38 +0300
+Subject: [PATCH 2/2] commandxml: Add support wthp_app_id interface
+
+With it, we hang off the app_id which we can use to pass it to the
+receiver side.
+
+Bug-AGL: SPEC-3601
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ data/command.xml | 29 +++++++++++++++++++++++++++++
+ src/waltham/header-preamble.txt | 1 +
+ 2 files changed, 30 insertions(+)
+
+diff --git a/data/command.xml b/data/command.xml
+index a03082b..cb53f75 100644
+--- a/data/command.xml
++++ b/data/command.xml
+@@ -1814,6 +1814,35 @@
+
+ </interface>
+
++ <interface name="wthp_ivi_app_id" version="1">
++ <description summary="create ivi-style surfaces">
++ This interface is exposed as a global singleton.
++ This interface is implemented by servers that provide IVI-style user interfaces.
++ It allows clients to associate an ivi_surface with wthp_surface.
++ </description>
++
++ <enum name="error">
++ <entry name="role" value="0" summary="given wthp_surface has another role"/>
++ </enum>
++
++ <request name="surface_create">
++ <description summary="create ivi_surface with app_id in ivi compositor">
++ This request gives the wthp_surface the role of an IVI Surface. Creating more than
++ one ivi_surface for a wthp_surface is not allowed. Note, that this still allows the
++ following example:
++
++ 1. create a wthp_surface
++ 2. create ivi_surface for the wthp_surface
++ 3. destroy the ivi_surface
++
++ </description>
++ <arg name="app_id" type="string"/>
++ <arg name="surface" type="object" interface="wthp_surface"/>
++ <arg name="id" type="new_id" interface="wthp_ivi_surface"/>
++ </request>
++
++ </interface>
++
+ <interface name="dummy" version="1">
+ <request name="dummy_request">
+ </request>
+diff --git a/src/waltham/header-preamble.txt b/src/waltham/header-preamble.txt
+index df765cc..2409859 100644
+--- a/src/waltham/header-preamble.txt
++++ b/src/waltham/header-preamble.txt
+@@ -50,5 +50,6 @@ struct wthp_touch;
+
+ struct wthp_ivi_surface;
+ struct wthp_ivi_application;
++struct wthp_ivi_app_id;
+
+ struct dummy;
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend b/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend
new file mode 100644
index 000000000..8d0436a3b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append = "\
+ file://0001-waltham-Fix-compile-build-error.patch \
+ file://0002-commandxml-Add-support-wthp_app_id-interface.patch \
+ file://0001-Use-python3-instead-of-2.patch \
+ "
diff --git a/meta-agl-core/recipes-graphics/wayland/waltham_git.bb b/meta-agl-core/recipes-graphics/wayland/waltham_git.bb
new file mode 100644
index 000000000..01023a1f2
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/waltham_git.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "Waltham is a network IPC library designed to resemble Wayland both protocol and protocol-API wise"
+HOMEPAGE = "https://github.com/waltham/waltham"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = " \
+ file://LICENSE;md5=e8ad01a5182f2c1b3a2640e9ea268264 \
+"
+SRCREV = "1de58c3ff746ddaba7584d760c5454243723d3ca"
+SRC_URI = "git://github.com/wmizuno/waltham.git \
+ "
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+DEPENDS += "libdrm virtual/kernel wayland"
+RDEPENDS_${PN} += "libdrm" \ No newline at end of file
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
new file mode 100644
index 000000000..16c0f046d
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://core.cfg \
+ file://shell.cfg \
+ file://hdmi-a-1-270.cfg \
+ "
+
+# cluster and html5-landscape
+# core, shell, hdmi-a-1-180.cfg, virtual-landscape.cfg
+SRC_URI_remove_landscape = " \
+ file://hdmi-a-1-270.cfg \
+ file://hdmi-a-1-90.cfg \
+ file://virtual.cfg \
+"
+SRC_URI_append_landscape = " \
+ file://hdmi-a-1-180.cfg \
+ file://virtual-landscape.cfg \
+"
+
+
+S = "${WORKDIR}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_compile() {
+ # Put all of our cfg files together.
+ rm -f ${WORKDIR}/weston.ini
+ for F in ${WORKDIR}/*.cfg; do
+ cat $F >> ${WORKDIR}/weston.ini
+ echo >> ${WORKDIR}/weston.ini
+ done
+ sed -i -e '$ d' ${WORKDIR}/weston.ini
+}
+
+do_install_append() {
+ WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
+ install -d ${D}${WESTON_INI_CONFIG}
+ install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini
+}
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
new file mode 100644
index 000000000..179004094
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf.bbappend
@@ -0,0 +1,12 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+SRC_URI += "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", "file://remote-output.cfg", "",d)}"
+
+
+# For virtual machines and intel-corei7-64 we want to support both the HDMI-A-1
+# and Virtual-1 outputs. This allows us to run virtual images on real hardware
+# and vice versa.
+SRC_URI_append_qemuall = " file://virtual.cfg"
+SRC_URI_append_intel-corei7-64 = " file://virtual.cfg"
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg
new file mode 100644
index 000000000..90774ed79
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/core.cfg
@@ -0,0 +1,4 @@
+[core]
+backend=drm-backend.so
+require-input=false
+modules=systemd-notify.so
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg
new file mode 100644
index 000000000..dffc2b6dd
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-270.cfg
@@ -0,0 +1,6 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 270 degrees
+# to have a proper orientation of the homescreen. For example the various sizes
+# of the GeChic display or the Dell display.
+[output]
+name=HDMI-A-1
+transform=270
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg
new file mode 100644
index 000000000..88a692a1b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/hdmi-a-1-90.cfg
@@ -0,0 +1,6 @@
+# A display is connected to HDMI-A-1 and needs to be rotated 90 degrees
+# to have a proper orientation of the homescreen. For example, the 'eGalax'
+# display used in some instances.
+[output]
+name=HDMI-A-1
+transform=90
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg
new file mode 100644
index 000000000..f69a2e096
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg
@@ -0,0 +1,5 @@
+[remote-output]
+name=remote-1
+mode=640x720@30
+host=192.168.20.99
+port=5005
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg
new file mode 100644
index 000000000..975e539e6
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/shell.cfg
@@ -0,0 +1,3 @@
+[shell]
+locking=true
+panel-position=none
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual.cfg b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual.cfg
new file mode 100644
index 000000000..25a8fae94
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-ini-conf/virtual.cfg
@@ -0,0 +1,18 @@
+[output]
+name=Virtual-1
+transform=270
+mode=1920x1080
+#mode=1600x1200
+#mode=1680x1050
+#mode=1400x1050
+#mode=1600x900
+#mode=1280x1024
+#mode=1440x900
+#mode=1280x960
+#mode=1360x768
+#mode=1280x800
+#mode=1280x768
+#mode=1280x720
+#mode=800x600
+#mode=848x480
+#mode=640x480
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-init.bbappend b/meta-agl-core/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 000000000..c09d7ccd3
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston-init_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc
new file mode 100644
index 000000000..51c59ae4d
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston-init_aglcore.inc
@@ -0,0 +1,6 @@
+do_install_append() {
+ # Remove upstream weston.ini to avoid conflict with weston-ini-conf package
+ rm -f ${D}${sysconfdir}/xdg/weston/weston.ini
+}
+
+SYSTEMD_AUTO_ENABLE = "enable"
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch
new file mode 100644
index 000000000..32755c4b3
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Expose-weston_output_damage-in-libweston.patch
@@ -0,0 +1,30 @@
+From 7e5fb58591a29d60657158262a0772796bfd3461 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Wed, 12 Feb 2020 13:18:19 +0200
+Subject: [PATCH] libweston: Expose weston_output_damage() in libweston
+
+We have weston_compositor_damage_all() exported and declared but users
+might need weston_output_damage() to refer to an individual output. The
+symbol already exported so just declare it.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ include/libweston/libweston.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h
+index 1439775e..9fac5be0 100644
+--- a/include/libweston/libweston.h
++++ b/include/libweston/libweston.h
+@@ -1604,6 +1604,8 @@ weston_compositor_schedule_repaint(struct weston_compositor *compositor);
+ void
+ weston_compositor_damage_all(struct weston_compositor *compositor);
+ void
++weston_output_damage(struct weston_output *woutput);
++void
+ weston_compositor_wake(struct weston_compositor *compositor);
+ void
+ weston_compositor_sleep(struct weston_compositor *compositor);
+--
+2.20.1
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch
new file mode 100644
index 000000000..02af7cbaf
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0001-libweston-Migrate-weston_seat_init-release-to-public.patch
@@ -0,0 +1,106 @@
+From 4534fcab54409b08faf4445ed6780136b58afb63 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Mon, 28 Sep 2020 22:51:00 +0300
+Subject: [PATCH 1/2] libweston: Migrate weston_seat_init/release to public
+ headers
+
+weston_seat_init/release needed for creating weston plug-ins that want
+manage seat/input on their own.
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+---
+ include/libweston/libweston.h | 25 +++++++++++++++++++++++++
+ libweston/libweston-internal.h | 31 +++----------------------------
+ 2 files changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h
+index 54ea008..59541f2 100644
+--- a/include/libweston/libweston.h
++++ b/include/libweston/libweston.h
+@@ -2053,6 +2053,31 @@ void
+ weston_timeline_refresh_subscription_objects(struct weston_compositor *wc,
+ void *object);
+
++/* input, seat */
++void
++weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec,
++ const char *seat_name);
++void
++weston_seat_release(struct weston_seat *seat);
++
++void
++weston_seat_init_pointer(struct weston_seat *seat);
++
++int
++weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap);
++
++void
++weston_seat_init_touch(struct weston_seat *seat);
++
++void
++weston_seat_release_keyboard(struct weston_seat *seat);
++
++void
++weston_seat_release_pointer(struct weston_seat *seat);
++
++void
++weston_seat_release_touch(struct weston_seat *seat);
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff --git a/libweston/libweston-internal.h b/libweston/libweston-internal.h
+index 66c38e8..f5c4c2c 100644
+--- a/libweston/libweston-internal.h
++++ b/libweston/libweston-internal.h
+@@ -168,44 +168,19 @@ weston_plane_init(struct weston_plane *plane,
+ void
+ weston_plane_release(struct weston_plane *plane);
+
+-/* weston_seat */
+-
+ struct clipboard *
+ clipboard_create(struct weston_seat *seat);
+
+-void
+-weston_seat_init(struct weston_seat *seat, struct weston_compositor *ec,
+- const char *seat_name);
+-
+-void
+-weston_seat_repick(struct weston_seat *seat);
++/* weston_seat */
+
+ void
+-weston_seat_release(struct weston_seat *seat);
++weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap);
+
+ void
+ weston_seat_send_selection(struct weston_seat *seat, struct wl_client *client);
+
+ void
+-weston_seat_init_pointer(struct weston_seat *seat);
+-
+-int
+-weston_seat_init_keyboard(struct weston_seat *seat, struct xkb_keymap *keymap);
+-
+-void
+-weston_seat_init_touch(struct weston_seat *seat);
+-
+-void
+-weston_seat_release_keyboard(struct weston_seat *seat);
+-
+-void
+-weston_seat_release_pointer(struct weston_seat *seat);
+-
+-void
+-weston_seat_release_touch(struct weston_seat *seat);
+-
+-void
+-weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap);
++weston_seat_repick(struct weston_seat *seat);
+
+ void
+ wl_data_device_set_keyboard_focus(struct weston_seat *seat);
+--
+2.28.0
+
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch b/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch
new file mode 100644
index 000000000..cb122590b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston/0005-correctly-tear-down-drm-backend.patch
@@ -0,0 +1,37 @@
+commit 5130a8c21a9deea54e8f7c96a3a5049e2d60a210
+Author: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu Jul 30 14:47:32 2020 +0300
+
+backend-drm: Correctly tear down the DRM backend
+
+It seem that we skipped to put back in TEXT mode the tty, in case a DRM
+device node wasn't present at that time, or it isn't present at all. This
+orders the destroy part correctly as to handle that case as well.
+
+As a side effect, as the tty will still be set to GRAPHICS mode we will
+require a manual change of the tty number, which might be not possible
+on all systems. Properly putting back the tty to TEXT mode should avoid
+that, and allows to re-use the same tty no in case the DRM device has
+been created at a later point in time.
+
+Upstream-Status: Backport
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c
+index 980a12da..1cf61a33 100644
+--- a/libweston/backend-drm/drm.c
++++ b/libweston/backend-drm/drm.c
+@@ -3031,10 +3031,10 @@ err_sprite:
+ destroy_sprites(b);
+ err_udev_dev:
+ udev_device_unref(drm_device);
+-err_launcher:
+- weston_launcher_destroy(compositor->launcher);
+ err_udev:
+ udev_unref(b->udev);
++err_launcher:
++ weston_launcher_destroy(compositor->launcher);
+ err_compositor:
+ weston_compositor_shutdown(compositor);
+ free(b);
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend b/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend
new file mode 100644
index 000000000..f627f5cb2
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston_8.0.%.bbappend
@@ -0,0 +1 @@
+require ${@bb.utils.contains('AGL_FEATURES', 'aglcore', 'weston_8.0_aglcore.inc', '', d)}
diff --git a/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc b/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc
new file mode 100644
index 000000000..c2495465b
--- /dev/null
+++ b/meta-agl-core/recipes-graphics/wayland/weston_8.0_aglcore.inc
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/weston"
+
+SRC_URI_append = "\
+ file://0001-libweston-Expose-weston_output_damage-in-libweston.patch \
+ file://0001-libweston-Migrate-weston_seat_init-release-to-public.patch \
+ file://0005-correctly-tear-down-drm-backend.patch \
+ "
+
+# Workaround for incorrect upstream definition
+PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
+PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}"