Yocto 2.3

Move OpenBMC to Yocto 2.3(pyro).

Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo-fpu.inc b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo-fpu.inc
index ef72e89..fe7c533 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo-fpu.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo-fpu.inc
@@ -1,6 +1,6 @@
 
 def get_cairo_fpu_setting(bb, d):
-    if d.getVar('TARGET_FPU', True) in [ 'soft' ]:
+    if d.getVar('TARGET_FPU') in [ 'soft' ]:
         return "--disable-some-floating-point"
     return ""
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
index c4b6f32..8e1e2e1 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
@@ -13,6 +13,7 @@
 LICENSE = "MPL-1 & LGPLv2.1 & GPLv3+"
 LICENSE_${PN} = "MPL-1 & LGPLv2.1"
 LICENSE_${PN}-dev = "MPL-1 & LGPLv2.1"
+LICENSE_${PN}-doc = "MPL-1 & LGPLv2.1"
 LICENSE_${PN}-gobject = "MPL-1 & LGPLv2.1"
 LICENSE_${PN}-script-interpreter = "MPL-1 & LGPLv2.1"
 LICENSE_${PN}-perf-utils = "GPLv3+"
@@ -21,7 +22,7 @@
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
+           ${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)}"
 
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.8.bb
similarity index 92%
rename from import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.8.bb
index d2c1e12..5a3c74f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.8.bb
@@ -4,8 +4,8 @@
 
 SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "23a0b2f0235431d35238df1d3a517fdb"
-SRC_URI[sha256sum] = "613cb38447b76a93ff7235e17acd55a78b52ea84a9df128c3f2257f8eaa7b252"
+SRC_URI[md5sum] = "4ef0db2eacb271c74f8a3fd87822aa98"
+SRC_URI[sha256sum] = "d1f2d98ae9a4111564f6de4e013d639cf77155baf2556582295a0f00a9bc5e20"
 
 PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
index e3e4cde..c71ab11 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
@@ -18,7 +18,7 @@
 
 S = "${WORKDIR}/git"
 
-inherit autotools allarch fontcache
+inherit autotools allarch fontcache pkgconfig
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[fontforge] = "--enable-source-rebuild=yes,--enable-source-rebuild=no,fontforge-native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc
index c6ecd08..6dbbf4d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc
@@ -35,7 +35,7 @@
 
 # Default configuration, distros might want to override
 PACKAGECONFIG ??= "egl \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}"
 
 FILES_${PN}-examples = "${libdir}/clutter/examples"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb
deleted file mode 100644
index 9626cd9..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.18.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require clutter-gst-3.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
-
-SRC_URI[archive.md5sum] = "3e4f64477f26d9cfd2db06d3aaed203a"
-SRC_URI[archive.sha256sum] = "0aec0d0c6020cd19a5bb0dab1165a92748f81a9a3acdfabb0f966d5f53bc8093"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.22.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.22.bb
new file mode 100644
index 0000000..6177c91
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.22.bb
@@ -0,0 +1,7 @@
+require clutter-gst-3.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
+
+SRC_URI[archive.md5sum] = "88eea2dd5fc4357b5b18f1dfeed56c62"
+SRC_URI[archive.sha256sum] = "f1fc57fb32ea7e3d9234b58db35eb9ef3028cf0b266d85235f959edc0fe3dfd4"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb
deleted file mode 100644
index 675365c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require clutter-gtk-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI[archive.md5sum] = "351cf9229cf941d36b441ede2236d742"
-SRC_URI[archive.sha256sum] = "742ef9d68ece36cbb1b2e1a4a6fbdad932f6645360be7e6de75abbb140dfbf1d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.2.bb
new file mode 100644
index 0000000..78050df
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.8.2.bb
@@ -0,0 +1,6 @@
+require clutter-gtk-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI[archive.md5sum] = "6698207ee6e3d5a1c0ffc0a23444e12f"
+SRC_URI[archive.sha256sum] = "da27d486325490ad3f65d2abf9413aeb8b4a8f7b559e4b2f73567a5344a26b94"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/0001-Fix-an-incorrect-preprocessor-conditional.patch b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/0001-Fix-an-incorrect-preprocessor-conditional.patch
new file mode 100644
index 0000000..2a9d8f8
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/0001-Fix-an-incorrect-preprocessor-conditional.patch
@@ -0,0 +1,32 @@
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Backport
+
+
+Original upstream commit follows:
+
+From b583e21d8698dbd58013320cfb47739102efdea7 Mon Sep 17 00:00:00 2001
+From: Kalev Lember <klember@redhat.com>
+Date: Wed, 19 Oct 2016 23:38:28 +0200
+Subject: [PATCH] Fix an incorrect preprocessor conditional
+
+This fixes the build with wayland wayland egl server support disabled.
+---
+ cogl/winsys/cogl-winsys-egl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
+index 39bfd884..4a9f3aa6 100644
+--- a/cogl/winsys/cogl-winsys-egl.c
++++ b/cogl/winsys/cogl-winsys-egl.c
+@@ -1029,7 +1029,7 @@ _cogl_egl_create_image (CoglContext *ctx,
+     egl_ctx = EGL_NO_CONTEXT;
+   else
+ #endif
+-#if COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
++#ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
+   /* The WL_bind_wayland_display spec states that EGL_NO_CONTEXT is to be used
+    * in conjunction with the EGL_WAYLAND_BUFFER_WL target */
+   if (target == EGL_WAYLAND_BUFFER_WL)
+-- 
+2.11.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
deleted file mode 100644
index ed10c7a..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require cogl-1.0.inc
-
-SRC_URI += "file://test-backface-culling.c-fix-may-be-used-uninitialize.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
-SRC_URI[archive.md5sum] = "ab684ec96848d79d22757fb3064820c8"
-SRC_URI[archive.sha256sum] = "689dfb5d14fc1106e9d2ded0f7930dcf7265d0bc84fa846b4f03941633eeaa91"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
new file mode 100644
index 0000000..5901062
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.2.bb
@@ -0,0 +1,8 @@
+require cogl-1.0.inc
+
+SRC_URI += "file://test-backface-culling.c-fix-may-be-used-uninitialize.patch \
+            file://0001-Fix-an-incorrect-preprocessor-conditional.patch"
+SRC_URI[archive.md5sum] = "d53b708ca7c4af03d7254e46945d6b33"
+SRC_URI[archive.sha256sum] = "39a718cdb64ea45225a7e94f88dddec1869ab37a21b339ad058a9d898782c00d"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch
index 30e0a61..ec1fb02 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch
@@ -1,15 +1,25 @@
-tests: also install tests app
+From 5c6eb43c2f6e7f2ee7c25c92e42f4e4403fa0527 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 21 Feb 2017 14:37:52 +0200
+Subject: [PATCH] tests: also install test apps
 
 Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Yu Ke <ke.yu@intel.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ tests/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
 
-Index: libdrm-2.4.66/tests/Makefile.am
-===================================================================
---- libdrm-2.4.66.orig/tests/Makefile.am
-+++ libdrm-2.4.66/tests/Makefile.am
-@@ -73,3 +73,4 @@ TESTS +=					\
- endif
- 
- check_PROGRAMS += $(TESTS)
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 0355a92..b4882cd 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -45,3 +45,4 @@ TESTS = \
+ check_PROGRAMS = \
+ 	$(TESTS) \
+ 	drmdevice
 +bin_PROGRAMS = $(check_PROGRAMS)
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.70.bb b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.75.bb
similarity index 77%
rename from import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.70.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.75.bb
index a2b5282..56963d4 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.70.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.75.bb
@@ -8,7 +8,7 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
 PROVIDES = "drm"
-DEPENDS = "libpthread-stubs udev libpciaccess"
+DEPENDS = "libpthread-stubs libpciaccess"
 
 SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
            file://installtests.patch \
@@ -16,25 +16,28 @@
            file://0001-configure.ac-Allow-explicit-enabling-of-cunit-tests.patch \
           "
 
-SRC_URI[md5sum] = "920957cfe25a80efb02be9bd90bf3c1e"
-SRC_URI[sha256sum] = "b17d4b39ed97ca0e4cffa0db06ff609e617bac94646ec38e8e0579d530540e7b"
+SRC_URI[md5sum] = "57b0589122ec4b8d5dfb9e430a21f0b3"
+SRC_URI[sha256sum] = "2d5a500eef412cc287d12268eed79d571e262d4957a2ec9258073f305985054f"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig manpages
 
 EXTRA_OECONF += "--disable-cairo-tests \
                  --without-cunit \
                  --enable-omap-experimental-api \
+                 --enable-etnaviv-experimental-api \
                  --enable-install-test-programs \
-                 --disable-manpages \
                  --disable-valgrind \
                 "
+PACKAGECONFIG[manpages] = "--enable-manpages, --disable-manpages, libxslt-native xmlto-native"
 
 ALLOW_EMPTY_${PN}-drivers = "1"
 PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
-             ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu"
+             ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \
+             ${PN}-etnaviv"
 
 RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
-                             ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu"
+                             ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
+                             ${PN}-etnaviv"
 
 FILES_${PN}-tests = "${bindir}/*"
 FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
@@ -45,3 +48,4 @@
 FILES_${PN}-kms = "${libdir}/libkms*.so.*"
 FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
 FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
+FILES_${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb
index 455d31e..dc2820c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-fb_1.0.0.bb
@@ -1,6 +1,6 @@
 EGLINFO_PLATFORM ?= "fb"
 EGLINFO_BINARY_NAME ?= "eglinfo-fb"
 
-include eglinfo.inc
+require eglinfo.inc
 
 SUMMARY += "(Framebuffer version)"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
index 3427fdf..48ab880 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo-x11_1.0.0.bb
@@ -1,12 +1,13 @@
 EGLINFO_PLATFORM ?= "x11"
 EGLINFO_BINARY_NAME ?= "eglinfo-x11"
 
-include eglinfo.inc
+require eglinfo.inc
 
 DEPENDS += "virtual/libx11"
 
 inherit distro_features_check
+
 # depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES += "x11"
 
 SUMMARY += "(X11 version)"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc b/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc
index d0c0c27..8e7d9bd 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc
@@ -11,6 +11,8 @@
           "
 SRCREV = "4b317648ec6cf39556a9e5d8078f605bc0edd5de"
 
+CVE_PRODUCT = "eglinfo"
+
 S = "${WORKDIR}/git"
 
 inherit waf distro_features_check
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch
new file mode 100644
index 0000000..cad7170
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch
@@ -0,0 +1,72 @@
+From 20cddc824c6501c2082cac41b162c34cd5fcc530 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 11 Dec 2016 14:32:00 -0800
+Subject: [PATCH] Avoid conflicts with integer width macros from TS
+ 18661-1:2014
+
+glibc 2.25+ has now defined these macros in <limits.h>
+https://sourceware.org/git/?p=glibc.git;a=commit;h=5b17fd0da62bf923cb61d1bb7b08cf2e1f1f9c1a
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ fontconfig/fontconfig.h | 2 +-
+ src/fcobjs.h            | 2 +-
+ src/fcobjshash.gperf    | 2 +-
+ src/fcobjshash.h        | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: fontconfig-2.12.1/fontconfig/fontconfig.h
+===================================================================
+--- fontconfig-2.12.1.orig/fontconfig/fontconfig.h
++++ fontconfig-2.12.1/fontconfig/fontconfig.h
+@@ -128,7 +128,8 @@ typedef int		FcBool;
+ #define FC_USER_CACHE_FILE	    ".fonts.cache-" FC_CACHE_VERSION
+ 
+ /* Adjust outline rasterizer */
+-#define FC_CHAR_WIDTH	    "charwidth"	/* Int */
++#define FC_CHARWIDTH	    "charwidth"	/* Int */
++#define FC_CHAR_WIDTH	    FC_CHARWIDTH
+ #define FC_CHAR_HEIGHT	    "charheight"/* Int */
+ #define FC_MATRIX	    "matrix"    /* FcMatrix */
+ 
+Index: fontconfig-2.12.1/src/fcobjs.h
+===================================================================
+--- fontconfig-2.12.1.orig/src/fcobjs.h
++++ fontconfig-2.12.1/src/fcobjs.h
+@@ -51,7 +51,7 @@ FC_OBJECT (DPI,			FcTypeDouble,	NULL)
+ FC_OBJECT (RGBA,		FcTypeInteger,	NULL)
+ FC_OBJECT (SCALE,		FcTypeDouble,	NULL)
+ FC_OBJECT (MINSPACE,		FcTypeBool,	NULL)
+-FC_OBJECT (CHAR_WIDTH,		FcTypeInteger,	NULL)
++FC_OBJECT (CHARWIDTH,		FcTypeInteger,	NULL)
+ FC_OBJECT (CHAR_HEIGHT,		FcTypeInteger,	NULL)
+ FC_OBJECT (MATRIX,		FcTypeMatrix,	NULL)
+ FC_OBJECT (CHARSET,		FcTypeCharSet,	FcCompareCharSet)
+Index: fontconfig-2.12.1/src/fcobjshash.gperf
+===================================================================
+--- fontconfig-2.12.1.orig/src/fcobjshash.gperf
++++ fontconfig-2.12.1/src/fcobjshash.gperf
+@@ -44,7 +44,7 @@ int id;
+ "rgba",FC_RGBA_OBJECT
+ "scale",FC_SCALE_OBJECT
+ "minspace",FC_MINSPACE_OBJECT
+-"charwidth",FC_CHAR_WIDTH_OBJECT
++"charwidth",FC_CHARWIDTH_OBJECT
+ "charheight",FC_CHAR_HEIGHT_OBJECT
+ "matrix",FC_MATRIX_OBJECT
+ "charset",FC_CHARSET_OBJECT
+Index: fontconfig-2.12.1/src/fcobjshash.h
+===================================================================
+--- fontconfig-2.12.1.orig/src/fcobjshash.h
++++ fontconfig-2.12.1/src/fcobjshash.h
+@@ -284,7 +284,7 @@ FcObjectTypeLookup (register const char
+       {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT},
+       {-1},
+ #line 47 "fcobjshash.gperf"
+-      {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT},
++      {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT},
+ #line 48 "fcobjshash.gperf"
+       {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT},
+ #line 55 "fcobjshash.gperf"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb
index 115f558..95b066c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.12.1.bb
@@ -22,6 +22,7 @@
 
 SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
            file://revert-static-pkgconfig.patch \
+           file://0001-Avoid-conflicts-with-integer-width-macros-from-TS-18.patch \
            "
 SRC_URI[md5sum] = "ce55e525c37147eee14cc2de6cc09f6c"
 SRC_URI[sha256sum] = "a9f42d03949f948a3a4f762287dbc16e53a927c91a07ee64207ebd90a9e5e292"
@@ -36,7 +37,7 @@
 RCONFLICTS_fontconfig-utils = "libfontconfig-utils"
 DEBIAN_NOAUTONAME_fontconfig-utils = "1"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig relative_symlinks
 
 FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.5.bb b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.7.1.bb
similarity index 92%
rename from import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.5.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.7.1.bb
index 97dde3a..544f835 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.5.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/freetype/freetype_2.7.1.bb
@@ -18,8 +18,8 @@
 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/freetype/files/freetype2/"
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
 
-SRC_URI[md5sum] = "6a386964e18ba28cb93370e57a19031b"
-SRC_URI[sha256sum] = "e20a6e1400798fd5e3d831dd821b61c35b1f9a6465d6b18a53a9df4cf441acf0"
+SRC_URI[md5sum] = "b3230110e0cab777e0df7631837ac36e"
+SRC_URI[sha256sum] = "3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88"
 
 inherit autotools pkgconfig binconfig-disabled multilib_header
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
index 489dd7c..1c93ca0 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/glew/glew_2.0.0.bb
@@ -2,12 +2,9 @@
 DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
 HOMEPAGE = "http://glew.sourceforge.net/"
 BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
-SECTION = "x11"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
 
-DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
-
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
            file://no-strip.patch"
 
@@ -19,12 +16,18 @@
 
 inherit lib_package pkgconfig distro_features_check
 
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES = "opengl"
 
-# Override SYSTEM to avoid calling config.guess, we're cross-compiling.  Pass
-# our CFLAGS via POPT as that's the optimisation variable and safely
-# overwritten.
-EXTRA_OEMAKE = "SYSTEM='linux' \
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'opengl', 'egl-gles2', d)}"
+
+# The opengl and egl-XXX options are exclusive, enable only one.
+PACKAGECONFIG[opengl] = "SYSTEM='linux',,virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
+PACKAGECONFIG[egl-gles2] = "SYSTEM='linux-egl' GLEW_NO_GLU='-DGLEW_NO_GLU' LDFLAGS.GL='-lEGL -lGLESv2',,virtual/egl virtual/libgles2"
+
+# Override SYSTEM (via PACKAGECONFIG_CONFARGS) to avoid calling config.guess,
+# we're cross-compiling. Pass our CFLAGS via POPT as that's the optimisation
+# variable and safely overwritten.
+EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} \
                 CC='${CC}' LD='${CC}' STRIP='' \
                 LDFLAGS.EXTRA='${LDFLAGS}' \
                 POPT='${CFLAGS}' \
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bb
similarity index 88%
rename from import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bb
index f24c443..fc4773e 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.4.1.bb
@@ -12,8 +12,8 @@
 
 SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
 
-SRC_URI[md5sum] = "a82d49ff67197bc3c96ea34b98880c52"
-SRC_URI[sha256sum] = "b04be31633efee2cae1d62d46434587302554fa837224845a62565ec68a0334d"
+SRC_URI[md5sum] = "7b3f445d0a58485a31c18c03ce9b4e3c"
+SRC_URI[sha256sum] = "85a27fab639a1d651737dcb6b69e4101e3fd09522fdfdcb793df810b5cb315bd"
 
 inherit autotools pkgconfig lib_package gtk-doc
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo/fix-mips.patch b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo/fix-mips.patch
new file mode 100644
index 0000000..4d41237
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo/fix-mips.patch
@@ -0,0 +1,45 @@
+Fix a regression that causes the MIPS code from building.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 7bfb22af123ac10798a9a4c9ec7b23e5065db35e Mon Sep 17 00:00:00 2001
+From: DRC <information@libjpeg-turbo.org>
+Date: Mon, 26 Sep 2016 17:59:14 -0500
+Subject: [PATCH] Fix broken MIPS build
+
+Regression introduced by 9055fb408dcb585ce9392d395e16630d51002152
+
+Fixes #104
+---
+ ChangeLog.md      | 3 +++
+ simd/jsimd_mips.c | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/ChangeLog.md b/ChangeLog.md
+index e2b9df3..71ddcaa 100644
+--- a/ChangeLog.md
++++ b/ChangeLog.md
+@@ -6,6 +6,9 @@
+ 1. Fixed a regression introduced by 1.5.1[7] that prevented libjpeg-turbo from
+ building with Android NDK platforms prior to android-21 (5.0).
+ 
++2. Fixed a regression introduced by 1.5.1[1] that prevented the MIPS DSPR2 SIMD
++code in libjpeg-turbo from building.
++
+ 
+ 1.5.1
+ =====
+diff --git a/simd/jsimd_mips.c b/simd/jsimd_mips.c
+index 63b8115..02e90cd 100644
+--- a/simd/jsimd_mips.c
++++ b/simd/jsimd_mips.c
+@@ -63,6 +63,8 @@ parse_proc_cpuinfo(const char* search_string)
+ LOCAL(void)
+ init_simd (void)
+ {
++  char *env = NULL;
++
+   if (simd_support != ~0U)
+     return;
+ 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.1.bb
similarity index 70%
rename from import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.1.bb
index c9e70d7..de2eeaf 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.1.bb
@@ -7,11 +7,13 @@
                     file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
                     file://djpeg.c;endline=11;md5=b90b6d2b4119f9e5807cd273f525d2af \
 "
-DEPENDS = "nasm-native"
+DEPENDS_append_x86-64_class-target = " nasm-native"
+DEPENDS_append_x86_class-target    = " nasm-native"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-SRC_URI[md5sum] = "3fc5d9b6a8bce96161659ae7a9939257"
-SRC_URI[sha256sum] = "9f397c31a67d2b00ee37597da25898b03eb282ccd87b135a50a69993b6a2035f"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+           file://fix-mips.patch"
+SRC_URI[md5sum] = "55deb139b0cac3c8200b75d485fc13f3"
+SRC_URI[sha256sum] = "41429d3d253017433f66e3d472b8c7d998491d2f41caa7306b8d9a6f2a2c666c"
 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
 UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
 
@@ -25,6 +27,9 @@
 
 inherit autotools pkgconfig
 
+# Add nasm-native dependency consistently for all build arches is hard
+EXTRA_OECONF_append_class-native = " --without-simd"
+
 # Work around missing x32 ABI support
 EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd", "", d)}"
 
@@ -32,8 +37,8 @@
 EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "--without-simd", "", d)}"
 
 # Provide a workaround if Altivec unit is not present in PPC
-EXTRA_OECONF_append_class-target_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
-EXTRA_OECONF_append_class-target_powerpc64 = "${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
+EXTRA_OECONF_append_class-target_powerpc = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
+EXTRA_OECONF_append_class-target_powerpc64 = " ${@bb.utils.contains("TUNE_FEATURES", "altivec", "", "--without-simd", d)}"
 
 PACKAGES =+ "jpeg-tools libturbojpeg"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch
deleted file mode 100644
index 674c8e8..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/0001-select-platforms-based-on-configuration-results.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 3a93150bc0aec86afdb7d053247dc2448925e09a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Wed, 6 May 2015 10:45:22 +0200
-Subject: [PATCH 1/2] select platforms based on configuration results
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/anholt/libepoxy/pull/52
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.ac          | 13 +++++--------
- src/dispatch_common.c |  9 ++++++---
- src/dispatch_common.h |  9 +++++----
- 3 files changed, 16 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index a52fc58..bdd70da 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -58,6 +58,10 @@ AC_CHECK_HEADER([KHR/khrplatform.h],
- # uintptr_t to a void *") by default.  Kill that.
- XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion])
- 
-+PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
-+
-+AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
-+
- has_znow=yes
- 
- case $host_os in
-@@ -86,7 +90,7 @@ case $host_os in
-         ;;
-     *)
-         build_egl=yes
--        build_glx=yes
-+        build_glx=$x11
-         build_wgl=no
-         # On platforms with dlopen, we load everything dynamically and
-         # don't link against a specific window system or GL implementation.
-@@ -144,13 +148,6 @@ esac
- 
- AC_SUBST([VISIBILITY_CFLAGS])
- 
--PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
--if test x$x11 = xno -a x$build_glx = xyes; then
--    AC_MSG_ERROR([libX11 headers (libx11-dev) required to build with GLX support])
--fi
--
--AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
--
- PKG_CHECK_MODULES(GL, [gl], [gl=yes], [gl=no])
- 
- AC_CONFIG_FILES([
-diff --git a/src/dispatch_common.c b/src/dispatch_common.c
-index 4e34d6e..2ab84ed 100644
---- a/src/dispatch_common.c
-+++ b/src/dispatch_common.c
-@@ -615,10 +615,13 @@ epoxy_get_proc_address(const char *name)
- #elif defined(__APPLE__)
-     return epoxy_gl_dlsym(name);
- #else
-+#if PLATFORM_HAS_GLX
-     if (epoxy_current_context_is_glx()) {
-         return glXGetProcAddressARB((const GLubyte *)name);
--    } else {
-+    } else
-+#endif /* PLATFORM_HAS_GLX */
- #if PLATFORM_HAS_EGL
-+    {
-         GLenum egl_api = epoxy_egl_get_current_gl_context_api();
- 
-         switch (egl_api) {
-@@ -628,10 +631,10 @@ epoxy_get_proc_address(const char *name)
-         case EGL_NONE:
-             break;
-         }
--#endif
-     }
-+#endif /* PLATFORM_HAS_EGL */
-     errx(1, "Couldn't find current GLX or EGL context.\n");
--#endif
-+#endif /* _WIN32 | __APPLE__*/
- }
- 
- void
-diff --git a/src/dispatch_common.h b/src/dispatch_common.h
-index 6b8503a..82681e4 100644
---- a/src/dispatch_common.h
-+++ b/src/dispatch_common.h
-@@ -21,12 +21,13 @@
-  * IN THE SOFTWARE.
-  */
- 
-+#include <config.h>
- #include <stdbool.h>
- 
- #ifdef _WIN32
- #define PLATFORM_HAS_EGL 0
- #define PLATFORM_HAS_GLX 0
--#define PLATFORM_HAS_WGL 1
-+#define PLATFORM_HAS_WGL BUILD_WGL
- #define EPOXY_IMPORTEXPORT __declspec(dllexport)
- #elif defined(__APPLE__)
- #define PLATFORM_HAS_EGL 0
-@@ -34,13 +35,13 @@
- #define PLATFORM_HAS_WGL 0
- #define EPOXY_IMPORTEXPORT
- #elif defined(ANDROID)
--#define PLATFORM_HAS_EGL 1
-+#define PLATFORM_HAS_EGL BUILD_EGL
- #define PLATFORM_HAS_GLX 0
- #define PLATFORM_HAS_WGL 0
- #define EPOXY_IMPORTEXPORT
- #else
--#define PLATFORM_HAS_EGL 1
--#define PLATFORM_HAS_GLX 1
-+#define PLATFORM_HAS_EGL BUILD_EGL
-+#define PLATFORM_HAS_GLX BUILD_GLX
- #define PLATFORM_HAS_WGL 0
- #define EPOXY_IMPORTEXPORT
- #endif
--- 
-1.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch
deleted file mode 100644
index 262d684..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/0002-add-an-option-to-disable-glx-support.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 24868cbfb9dda5f6929dd277c47d35df016e8754 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
-Date: Wed, 6 May 2015 11:05:48 +0200
-Subject: [PATCH 2/2] add an option to disable glx support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-this option would help us in yocto to get deterministic build results
-
-Upstream-Status: Submitted [1]
-
-[1] https://github.com/anholt/libepoxy/pull/52
-
-Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
----
- configure.ac | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index bdd70da..6c7153d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -58,7 +58,14 @@ AC_CHECK_HEADER([KHR/khrplatform.h],
- # uintptr_t to a void *") by default.  Kill that.
- XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion])
- 
--PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no])
-+AC_ARG_ENABLE([glx],
-+                [AS_HELP_STRING([--disable-glx],
-+				[disable if you don't want x11/glx support])],
-+                [],
-+                [enable_glx=yes]
-+             )
-+
-+PKG_CHECK_MODULES(X11, [x11], [x11=$enable_glx], [x11=no])
- 
- AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes)
- 
--- 
-1.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-need-for-python3.patch b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-need-for-python3.patch
deleted file mode 100644
index 4b8fea5..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy/no-need-for-python3.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-There is no need to use python3 by this package (the python scripts
-that are using during configuration only need python2.7+)
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Gary Thomas <gary@mlbassoc.com>
---
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -40,7 +40,7 @@ m4_ifndef([XORG_MACROS_VERSION],
- XORG_MACROS_VERSION(1.8)
- XORG_DEFAULT_OPTIONS
- 
--AC_CHECK_PROGS([PYTHON], [python3 python2 python])
-+AC_CHECK_PROGS([PYTHON], [python2 python])
- 
- # Initialize libtool
- AC_DISABLE_STATIC
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.0.bb
new file mode 100644
index 0000000..ee9f694
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_1.4.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "OpenGL function pointer management library"
+HOMEPAGE = "https://github.com/anholt/libepoxy/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
+
+SRC_URI = "https://github.com/anholt/${BPN}/releases/download/v1.4/${BP}.tar.xz"
+SRC_URI[md5sum] = "d8d8cbf2beb64975d424fcc5167a2a38"
+SRC_URI[sha256sum] = "25a906b14a921bc2b488cfeaa21a00486fe92630e4a9dd346e4ecabeae52ab41"
+UPSTREAM_CHECK_URI = "https://github.com/anholt/libepoxy/releases"
+
+inherit autotools pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "util-macros virtual/egl"
+
+PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_git.bb
deleted file mode 100644
index 6c247cc..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_git.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "OpenGL function pointer management library"
-HOMEPAGE = "https://github.com/anholt/libepoxy/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b"
-
-
-SRC_URI = " \
-    git://github.com/anholt/libepoxy.git \
-    file://0001-select-platforms-based-on-configuration-results.patch \
-    file://0002-add-an-option-to-disable-glx-support.patch \
-    file://no-need-for-python3.patch \
-"
-SRCREV="e2c33af5bfcfc9d168f9e776156dd47c33f428b3"
-PV = "1.3.1"
-
-S = "${WORKDIR}/git"
-
-inherit autotools pkgconfig distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "util-macros virtual/egl"
-
-PACKAGECONFIG[x11] = "--enable-glx, --disable-glx, virtual/libx11"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb b/import-layers/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
index 9c0ec54..c802a6f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
@@ -41,13 +41,10 @@
                 --disable-video-picogui --disable-video-qtopia --enable-sdl-dlopen \
                 --disable-rpath"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
 PACKAGECONFIG_class-native = "x11"
-PACKAGECONFIG_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-nativesdk = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 
 PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib"
 PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
new file mode 100644
index 0000000..efc8418
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch
@@ -0,0 +1,34 @@
+From b44808e43130dcd13b43e5b978b9b24aeb4c134c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Thu, 20 Oct 2016 14:57:51 +0200
+Subject: [PATCH] prepend our sysroot path so that make finds our
+ wayland-protocol files
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ configure.in | 4 +-
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 726ded3..3376600 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1206,7 +1206,7 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
+                 WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
+                 WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+                 WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
+-                WAYLAND_CORE_PROTOCOL_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-client`
+-                WAYLAND_PROTOCOLS_DIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
++                WAYLAND_CORE_PROTOCOL_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-client`
++                WAYLAND_PROTOCOLS_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
+                 video_wayland=yes
+             fi
+         fi
+-- 
+2.5.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch
deleted file mode 100644
index 44e6d4d..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0001-src-video-make-it-compatible-with-wayland-1.10.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From b1ed3533433501ec52c8289a5b3a294e57e7f798 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <martin.jansa@gmail.com>
-Date: Thu, 26 May 2016 11:31:52 +0000
-Subject: [PATCH] src/video: make it compatible with wayland 1.10
-
-| build/.libs/SDL_waylandevents.o: In function `wl_registry_bind':
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| build/.libs/SDL_waylandkeyboard.o: In function `wl_registry_bind':
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| build/.libs/SDL_waylandvideo.o: In function `wl_registry_bind':
-| /usr/include/wayland-client-protocol.h:305: undefined reference to `wl_proxy_marshal_constructor_versioned'
-| collect2: error: ld returned 1 exit status
-| make: *** [build/libSDL2.la] Error 1
-| ERROR: oe_runmake failed
-
-Upstream-Status: Pending
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
----
- src/video/wayland/SDL_waylanddyn.h | 1 +
- src/video/wayland/SDL_waylandsym.h | 4 ++++
- src/video/webos/SDL_waylanddyn.h   | 1 +
- src/video/webos/SDL_waylandsym.h   | 4 ++++
- 4 files changed, 10 insertions(+)
-
-diff --git a/src/video/wayland/SDL_waylanddyn.h b/src/video/wayland/SDL_waylanddyn.h
-index 8d9313a..c7b0157 100644
---- a/src/video/wayland/SDL_waylanddyn.h
-+++ b/src/video/wayland/SDL_waylanddyn.h
-@@ -79,6 +79,7 @@ void SDL_WAYLAND_UnloadSymbols(void);
- #define wl_proxy_get_user_data (*WAYLAND_wl_proxy_get_user_data)
- #define wl_proxy_add_listener (*WAYLAND_wl_proxy_add_listener)
- #define wl_proxy_marshal_constructor (*WAYLAND_wl_proxy_marshal_constructor)
-+#define wl_proxy_marshal_constructor_versioned (*WAYLAND_wl_proxy_marshal_constructor_versioned)
- 
- #define wl_seat_interface (*WAYLAND_wl_seat_interface)
- #define wl_surface_interface (*WAYLAND_wl_surface_interface)
-diff --git a/src/video/wayland/SDL_waylandsym.h b/src/video/wayland/SDL_waylandsym.h
-index c3b4fa5..b9a0d97 100644
---- a/src/video/wayland/SDL_waylandsym.h
-+++ b/src/video/wayland/SDL_waylandsym.h
-@@ -55,6 +55,10 @@ SDL_WAYLAND_SYM(void, wl_list_insert_list, (struct wl_list *, struct wl_list *))
- SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_4)
- SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor, (struct wl_proxy *, uint32_t opcode, const struct wl_interface *interface, ...))
- 
-+/* These functions are available in Wayland >= 1.10 */
-+SDL_WAYLAND_MODULE(WAYLAND_CLIENT_1_10)
-+SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_constructor_versioned, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, ...))
-+
- SDL_WAYLAND_INTERFACE(wl_seat_interface)
- SDL_WAYLAND_INTERFACE(wl_surface_interface)
- SDL_WAYLAND_INTERFACE(wl_shm_pool_interface)
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
new file mode 100644
index 0000000..7837315
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/0002-Avoid-finding-build-host-s-wayland-scanner.patch
@@ -0,0 +1,31 @@
+From ae879091cf65cb70293b375ec7e61ed12a96d8a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 2 Dec 2016 09:39:25 +0100
+Subject: [PATCH] Avoid finding build host's wayland-scanner
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 3376600..2aa6ed4 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1204,7 +1204,7 @@ AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
+             if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
+                 WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
+                 WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
+-                WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
++                AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+                 WAYLAND_CORE_PROTOCOL_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-client`
+                 WAYLAND_PROTOCOLS_DIR=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
+                 video_wayland=yes
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
new file mode 100644
index 0000000..1520bcf
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/fix-build-failure-on-ppc.patch
@@ -0,0 +1,50 @@
+Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/5184186d4366]
+
+Backport patch from upstream to fix build failures on ppc and ppc64.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+# HG changeset patch
+# User Sam Lantinga <slouken@libsdl.org>
+# Date 1477159315 25200
+# Node ID 5184186d4366169617b434f5b71c618a7035cde4
+# Parent  71d4148e32de5088c4bc2f04c1e5ded647a2bf82
+Fixed bug 3466 - Can't build 2.0.5 on ppc64
+
+/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c: In function 'calc_swizzle32':
+/home/fedora/SDL2-2.0.5/src/video/SDL_blit_N.c:127:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
+     const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
+     ^
+
+diff -r 71d4148e32de -r 5184186d4366 src/video/SDL_blit_N.c
+--- a/src/video/SDL_blit_N.c	Wed Oct 19 21:22:42 2016 -0700
++++ b/src/video/SDL_blit_N.c	Sat Oct 22 11:01:55 2016 -0700
+@@ -118,12 +118,6 @@
+         16, 8, 0, 24,
+         0, NULL
+     };
+-    if (!srcfmt) {
+-        srcfmt = &default_pixel_format;
+-    }
+-    if (!dstfmt) {
+-        dstfmt = &default_pixel_format;
+-    }
+     const vector unsigned char plus = VECUINT8_LITERAL(0x00, 0x00, 0x00, 0x00,
+                                                        0x04, 0x04, 0x04, 0x04,
+                                                        0x08, 0x08, 0x08, 0x08,
+@@ -136,6 +130,14 @@
+     Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
+     Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
+     Uint32 amask;
++
++    if (!srcfmt) {
++        srcfmt = &default_pixel_format;
++    }
++    if (!dstfmt) {
++        dstfmt = &default_pixel_format;
++    }
++
+     /* Use zero for alpha if either surface doesn't have alpha */
+     if (dstfmt->Amask) {
+         amask =
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
similarity index 74%
rename from import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
index 844ff33..12d3aaf 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.5.bb
@@ -14,15 +14,18 @@
 
 DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
 
-SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
-           file://linkage.patch \
-           file://0001-src-video-make-it-compatible-with-wayland-1.10.patch \
+SRC_URI = " \
+    http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
+    file://linkage.patch \
+    file://0001-prepend-our-sysroot-path-so-that-make-finds-our-wayl.patch \
+    file://0002-Avoid-finding-build-host-s-wayland-scanner.patch \
+    file://fix-build-failure-on-ppc.patch \
 "
 
 S = "${WORKDIR}/SDL2-${PV}"
 
-SRC_URI[md5sum] = "44fc4a023349933e7f5d7a582f7b886e"
-SRC_URI[sha256sum] = "da55e540bf6331824153805d58b590a29c39d2d506c6d02fa409aedeab21174b"
+SRC_URI[md5sum] = "d4055424d556b4a908aa76fad63abd3c"
+SRC_URI[sha256sum] = "442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785"
 
 inherit autotools lib_package binconfig pkgconfig
 
@@ -31,19 +34,17 @@
                 --disable-video-dummy \
                 --enable-pthreads \
                 --enable-sdl-dlopen \
-                --disable-rpath"
+                --disable-rpath \
+                WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT}"
 
 # opengl packageconfig factored out to make it easy for distros
 # and BSP layers to pick either (desktop) opengl, gles2, or no GL
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)}"
+PACKAGECONFIG_GL ?= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
 
 PACKAGECONFIG ??= " \
     ${PACKAGECONFIG_GL} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
 "
 PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
 PACKAGECONFIG[directfb]   = "--enable-video-directfb,--disable-video-directfb,directfb"
@@ -51,7 +52,7 @@
 PACKAGECONFIG[opengl]     = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
 PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
 PACKAGECONFIG[tslib]      = "--enable-input-tslib,--disable-input-tslib,tslib"
-PACKAGECONFIG[wayland]    = "--enable-video-wayland,--disable-video-wayland,wayland libxkbcommon"
+PACKAGECONFIG[wayland]    = "--enable-video-wayland,--disable-video-wayland,wayland-native wayland wayland-protocols libxkbcommon"
 PACKAGECONFIG[x11]        = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
 
 EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/files/0001-configure.ac-Use-wayland-scanner-in-PATH.patch b/import-layers/yocto-poky/meta/recipes-graphics/libva/files/0001-configure.ac-Use-wayland-scanner-in-PATH.patch
new file mode 100644
index 0000000..a99c225
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libva/files/0001-configure.ac-Use-wayland-scanner-in-PATH.patch
@@ -0,0 +1,37 @@
+From 0af30602502035155929dd2a14482b82a9747cf8 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 23 Feb 2017 15:23:15 +0200
+Subject: [PATCH] configure.ac: Use wayland-scanner in PATH
+
+pkg-config will give us the wrong wayland-scanner location.
+Use the one in path instead: it will be from native sysroot.
+
+This is a workaround and should be fixed upstream: preferably
+with the same fix as all the other wayland-scanner users
+(see YOCTO #11100).
+
+Upstream-Status: Inappropriate [workaround]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 64eddf2..5536f35 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -273,10 +273,7 @@ if test "$enable_wayland" = "yes"; then
+     PKG_CHECK_MODULES([WAYLAND], [wayland-client >= wayland_api_version],
+         [USE_WAYLAND="yes"], [:])
+     if test "$USE_WAYLAND" = "yes"; then
+-
+-        WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
+-        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
+-                     [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
++        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+ 
+         AC_DEFINE([HAVE_VA_WAYLAND], [1],
+                   [Defined to 1 if VA/Wayland API is built])
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/files/0001-wayland-Don-t-commit-and-ship-generated-files.patch b/import-layers/yocto-poky/meta/recipes-graphics/libva/files/0001-wayland-Don-t-commit-and-ship-generated-files.patch
new file mode 100644
index 0000000..bd97e22
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libva/files/0001-wayland-Don-t-commit-and-ship-generated-files.patch
@@ -0,0 +1,339 @@
+From 5993a7710cc8fd9a392d5015be5109987a42b498 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 23 Feb 2017 16:10:09 +0200
+Subject: [PATCH] wayland: Don't commit and ship generated files
+
+I believe shipping wayland-drm-client-protocol.h is wrong: The header
+should always be generated by the wayland-scanner that matches the
+runtime wayland version. Currently when someone clones the repo and
+builds, the shipped version is used.
+
+Upstream-Status: Submitted [https://github.com/01org/libva/pull/33]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ va/wayland/Makefile.am                   |   5 +-
+ va/wayland/wayland-drm-client-protocol.h | 290 -------------------------------
+ 2 files changed, 4 insertions(+), 291 deletions(-)
+ delete mode 100644 va/wayland/wayland-drm-client-protocol.h
+
+diff --git a/va/wayland/Makefile.am b/va/wayland/Makefile.am
+index 4f8262c..4ab8d07 100644
+--- a/va/wayland/Makefile.am
++++ b/va/wayland/Makefile.am
+@@ -53,7 +53,7 @@ protocol_source_h = \
+ noinst_LTLIBRARIES		= libva_wayland.la
+ libva_waylandincludedir		= ${includedir}/va
+ libva_waylandinclude_HEADERS	= $(source_h)
+-libva_wayland_la_SOURCES	= $(source_c) $(protocol_source_h)
++libva_wayland_la_SOURCES	= $(source_c)
+ noinst_HEADERS			= $(source_h_priv)
+ 
+ # Wayland protocol
+@@ -65,5 +65,8 @@ EXTRA_DIST = \
+ 	wayland-drm.xml         \
+ 	$(NULL)
+ 
++BUILT_SOURCES = $(protocol_source_h)
++CLEANFILES = $(BUILT_SOURCES)
++
+ # Extra clean files so that maintainer-clean removes *everything*
+ MAINTAINERCLEANFILES = Makefile.in
+diff --git a/va/wayland/wayland-drm-client-protocol.h b/va/wayland/wayland-drm-client-protocol.h
+deleted file mode 100644
+index da267e8..0000000
+--- a/va/wayland/wayland-drm-client-protocol.h
++++ /dev/null
+@@ -1,290 +0,0 @@
+-/* Generated by wayland-scanner 1.11.90 */
+-
+-#ifndef DRM_CLIENT_PROTOCOL_H
+-#define DRM_CLIENT_PROTOCOL_H
+-
+-#include <stdint.h>
+-#include <stddef.h>
+-#include "wayland-client.h"
+-
+-#ifdef  __cplusplus
+-extern "C" {
+-#endif
+-
+-/**
+- * @page page_drm The drm protocol
+- * @section page_ifaces_drm Interfaces
+- * - @subpage page_iface_wl_drm - 
+- * @section page_copyright_drm Copyright
+- * <pre>
+- *
+- * Copyright © 2008-2011 Kristian Høgsberg
+- * Copyright © 2010-2011 Intel Corporation
+- *
+- * Permission to use, copy, modify, distribute, and sell this
+- * software and its documentation for any purpose is hereby granted
+- * without fee, provided that\n the above copyright notice appear in
+- * all copies and that both that copyright notice and this permission
+- * notice appear in supporting documentation, and that the name of
+- * the copyright holders not be used in advertising or publicity
+- * pertaining to distribution of the software without specific,
+- * written prior permission.  The copyright holders make no
+- * representations about the suitability of this software for any
+- * purpose.  It is provided "as is" without express or implied
+- * warranty.
+- *
+- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+- * THIS SOFTWARE.
+- * </pre>
+- */
+-struct wl_buffer;
+-struct wl_drm;
+-
+-/**
+- * @page page_iface_wl_drm wl_drm
+- * @section page_iface_wl_drm_api API
+- * See @ref iface_wl_drm.
+- */
+-/**
+- * @defgroup iface_wl_drm The wl_drm interface
+- */
+-extern const struct wl_interface wl_drm_interface;
+-
+-#ifndef WL_DRM_ERROR_ENUM
+-#define WL_DRM_ERROR_ENUM
+-enum wl_drm_error {
+-	WL_DRM_ERROR_AUTHENTICATE_FAIL = 0,
+-	WL_DRM_ERROR_INVALID_FORMAT = 1,
+-	WL_DRM_ERROR_INVALID_NAME = 2,
+-};
+-#endif /* WL_DRM_ERROR_ENUM */
+-
+-#ifndef WL_DRM_FORMAT_ENUM
+-#define WL_DRM_FORMAT_ENUM
+-enum wl_drm_format {
+-	WL_DRM_FORMAT_C8 = 0x20203843,
+-	WL_DRM_FORMAT_RGB332 = 0x38424752,
+-	WL_DRM_FORMAT_BGR233 = 0x38524742,
+-	WL_DRM_FORMAT_XRGB4444 = 0x32315258,
+-	WL_DRM_FORMAT_XBGR4444 = 0x32314258,
+-	WL_DRM_FORMAT_RGBX4444 = 0x32315852,
+-	WL_DRM_FORMAT_BGRX4444 = 0x32315842,
+-	WL_DRM_FORMAT_ARGB4444 = 0x32315241,
+-	WL_DRM_FORMAT_ABGR4444 = 0x32314241,
+-	WL_DRM_FORMAT_RGBA4444 = 0x32314152,
+-	WL_DRM_FORMAT_BGRA4444 = 0x32314142,
+-	WL_DRM_FORMAT_XRGB1555 = 0x35315258,
+-	WL_DRM_FORMAT_XBGR1555 = 0x35314258,
+-	WL_DRM_FORMAT_RGBX5551 = 0x35315852,
+-	WL_DRM_FORMAT_BGRX5551 = 0x35315842,
+-	WL_DRM_FORMAT_ARGB1555 = 0x35315241,
+-	WL_DRM_FORMAT_ABGR1555 = 0x35314241,
+-	WL_DRM_FORMAT_RGBA5551 = 0x35314152,
+-	WL_DRM_FORMAT_BGRA5551 = 0x35314142,
+-	WL_DRM_FORMAT_RGB565 = 0x36314752,
+-	WL_DRM_FORMAT_BGR565 = 0x36314742,
+-	WL_DRM_FORMAT_RGB888 = 0x34324752,
+-	WL_DRM_FORMAT_BGR888 = 0x34324742,
+-	WL_DRM_FORMAT_XRGB8888 = 0x34325258,
+-	WL_DRM_FORMAT_XBGR8888 = 0x34324258,
+-	WL_DRM_FORMAT_RGBX8888 = 0x34325852,
+-	WL_DRM_FORMAT_BGRX8888 = 0x34325842,
+-	WL_DRM_FORMAT_ARGB8888 = 0x34325241,
+-	WL_DRM_FORMAT_ABGR8888 = 0x34324241,
+-	WL_DRM_FORMAT_RGBA8888 = 0x34324152,
+-	WL_DRM_FORMAT_BGRA8888 = 0x34324142,
+-	WL_DRM_FORMAT_XRGB2101010 = 0x30335258,
+-	WL_DRM_FORMAT_XBGR2101010 = 0x30334258,
+-	WL_DRM_FORMAT_RGBX1010102 = 0x30335852,
+-	WL_DRM_FORMAT_BGRX1010102 = 0x30335842,
+-	WL_DRM_FORMAT_ARGB2101010 = 0x30335241,
+-	WL_DRM_FORMAT_ABGR2101010 = 0x30334241,
+-	WL_DRM_FORMAT_RGBA1010102 = 0x30334152,
+-	WL_DRM_FORMAT_BGRA1010102 = 0x30334142,
+-	WL_DRM_FORMAT_YUYV = 0x56595559,
+-	WL_DRM_FORMAT_YVYU = 0x55595659,
+-	WL_DRM_FORMAT_UYVY = 0x59565955,
+-	WL_DRM_FORMAT_VYUY = 0x59555956,
+-	WL_DRM_FORMAT_AYUV = 0x56555941,
+-	WL_DRM_FORMAT_NV12 = 0x3231564e,
+-	WL_DRM_FORMAT_NV21 = 0x3132564e,
+-	WL_DRM_FORMAT_NV16 = 0x3631564e,
+-	WL_DRM_FORMAT_NV61 = 0x3136564e,
+-	WL_DRM_FORMAT_YUV410 = 0x39565559,
+-	WL_DRM_FORMAT_YVU410 = 0x39555659,
+-	WL_DRM_FORMAT_YUV411 = 0x31315559,
+-	WL_DRM_FORMAT_YVU411 = 0x31315659,
+-	WL_DRM_FORMAT_YUV420 = 0x32315559,
+-	WL_DRM_FORMAT_YVU420 = 0x32315659,
+-	WL_DRM_FORMAT_YUV422 = 0x36315559,
+-	WL_DRM_FORMAT_YVU422 = 0x36315659,
+-	WL_DRM_FORMAT_YUV444 = 0x34325559,
+-	WL_DRM_FORMAT_YVU444 = 0x34325659,
+-};
+-#endif /* WL_DRM_FORMAT_ENUM */
+-
+-#ifndef WL_DRM_CAPABILITY_ENUM
+-#define WL_DRM_CAPABILITY_ENUM
+-/**
+- * @ingroup iface_wl_drm
+- * wl_drm capability bitmask
+- *
+- * Bitmask of capabilities.
+- */
+-enum wl_drm_capability {
+-	/**
+-	 * wl_drm prime available
+-	 */
+-	WL_DRM_CAPABILITY_PRIME = 1,
+-};
+-#endif /* WL_DRM_CAPABILITY_ENUM */
+-
+-/**
+- * @ingroup iface_wl_drm
+- * @struct wl_drm_listener
+- */
+-struct wl_drm_listener {
+-	/**
+-	 */
+-	void (*device)(void *data,
+-		       struct wl_drm *wl_drm,
+-		       const char *name);
+-	/**
+-	 */
+-	void (*format)(void *data,
+-		       struct wl_drm *wl_drm,
+-		       uint32_t format);
+-	/**
+-	 */
+-	void (*authenticated)(void *data,
+-			      struct wl_drm *wl_drm);
+-	/**
+-	 */
+-	void (*capabilities)(void *data,
+-			     struct wl_drm *wl_drm,
+-			     uint32_t value);
+-};
+-
+-/**
+- * @ingroup wl_drm_iface
+- */
+-static inline int
+-wl_drm_add_listener(struct wl_drm *wl_drm,
+-		    const struct wl_drm_listener *listener, void *data)
+-{
+-	return wl_proxy_add_listener((struct wl_proxy *) wl_drm,
+-				     (void (**)(void)) listener, data);
+-}
+-
+-#define WL_DRM_AUTHENTICATE 0
+-#define WL_DRM_CREATE_BUFFER 1
+-#define WL_DRM_CREATE_PLANAR_BUFFER 2
+-#define WL_DRM_CREATE_PRIME_BUFFER 3
+-
+-/**
+- * @ingroup iface_wl_drm
+- */
+-#define WL_DRM_AUTHENTICATE_SINCE_VERSION 1
+-/**
+- * @ingroup iface_wl_drm
+- */
+-#define WL_DRM_CREATE_BUFFER_SINCE_VERSION 1
+-/**
+- * @ingroup iface_wl_drm
+- */
+-#define WL_DRM_CREATE_PLANAR_BUFFER_SINCE_VERSION 1
+-/**
+- * @ingroup iface_wl_drm
+- */
+-#define WL_DRM_CREATE_PRIME_BUFFER_SINCE_VERSION 2
+-
+-/** @ingroup iface_wl_drm */
+-static inline void
+-wl_drm_set_user_data(struct wl_drm *wl_drm, void *user_data)
+-{
+-	wl_proxy_set_user_data((struct wl_proxy *) wl_drm, user_data);
+-}
+-
+-/** @ingroup iface_wl_drm */
+-static inline void *
+-wl_drm_get_user_data(struct wl_drm *wl_drm)
+-{
+-	return wl_proxy_get_user_data((struct wl_proxy *) wl_drm);
+-}
+-
+-static inline uint32_t
+-wl_drm_get_version(struct wl_drm *wl_drm)
+-{
+-	return wl_proxy_get_version((struct wl_proxy *) wl_drm);
+-}
+-
+-/** @ingroup iface_wl_drm */
+-static inline void
+-wl_drm_destroy(struct wl_drm *wl_drm)
+-{
+-	wl_proxy_destroy((struct wl_proxy *) wl_drm);
+-}
+-
+-/**
+- * @ingroup iface_wl_drm
+- */
+-static inline void
+-wl_drm_authenticate(struct wl_drm *wl_drm, uint32_t id)
+-{
+-	wl_proxy_marshal((struct wl_proxy *) wl_drm,
+-			 WL_DRM_AUTHENTICATE, id);
+-}
+-
+-/**
+- * @ingroup iface_wl_drm
+- */
+-static inline struct wl_buffer *
+-wl_drm_create_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width, int32_t height, uint32_t stride, uint32_t format)
+-{
+-	struct wl_proxy *id;
+-
+-	id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
+-			 WL_DRM_CREATE_BUFFER, &wl_buffer_interface, NULL, name, width, height, stride, format);
+-
+-	return (struct wl_buffer *) id;
+-}
+-
+-/**
+- * @ingroup iface_wl_drm
+- */
+-static inline struct wl_buffer *
+-wl_drm_create_planar_buffer(struct wl_drm *wl_drm, uint32_t name, int32_t width, int32_t height, uint32_t format, int32_t offset0, int32_t stride0, int32_t offset1, int32_t stride1, int32_t offset2, int32_t stride2)
+-{
+-	struct wl_proxy *id;
+-
+-	id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
+-			 WL_DRM_CREATE_PLANAR_BUFFER, &wl_buffer_interface, NULL, name, width, height, format, offset0, stride0, offset1, stride1, offset2, stride2);
+-
+-	return (struct wl_buffer *) id;
+-}
+-
+-/**
+- * @ingroup iface_wl_drm
+- */
+-static inline struct wl_buffer *
+-wl_drm_create_prime_buffer(struct wl_drm *wl_drm, int32_t name, int32_t width, int32_t height, uint32_t format, int32_t offset0, int32_t stride0, int32_t offset1, int32_t stride1, int32_t offset2, int32_t stride2)
+-{
+-	struct wl_proxy *id;
+-
+-	id = wl_proxy_marshal_constructor((struct wl_proxy *) wl_drm,
+-			 WL_DRM_CREATE_PRIME_BUFFER, &wl_buffer_interface, NULL, name, width, height, format, offset0, stride0, offset1, stride1, offset2, stride2);
+-
+-	return (struct wl_buffer *) id;
+-}
+-
+-#ifdef  __cplusplus
+-}
+-#endif
+-
+-#endif
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.7.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.7.3.bb
new file mode 100644
index 0000000..6c0b90f
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/libva/libva_1.7.3.bb
@@ -0,0 +1,53 @@
+SUMMARY = "Video Acceleration (VA) API for Linux"
+DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
+and API specification which enables and provides access to graphics \
+hardware (GPU) acceleration for video processing on Linux and UNIX \
+based operating systems. Accelerated processing includes video \
+decoding, video encoding, subpicture blending and rendering. The \
+specification was originally designed by Intel for its GMA (Graphics \
+Media Accelerator) series of GPU hardware, the API is however not \
+limited to GPUs or Intel specific hardware, as other hardware and \
+manufacturers can also freely use this API for hardware accelerated \
+video decoding."
+
+HOMEPAGE = "https://01.org/linuxmedia/vaapi"
+BUGTRACKER = "https://github.com/01org/libva/issues"
+
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
+
+SRC_URI = "git://github.com/01org/libva.git;protocol=http;branch=v1.7-branch \
+           file://0001-configure.ac-Use-wayland-scanner-in-PATH.patch \
+           file://0001-wayland-Don-t-commit-and-ship-generated-files.patch"
+SRCREV = "dbf9f7e33349c3cee8d131e93a6a4f91255635cb"
+UPSTREAM_CHECK_GITTAGREGEX = "libva-(?P<pver>(\d+(\.\d+)+))"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "libdrm virtual/mesa virtual/libgles1 virtual/libgles2 virtual/egl"
+
+inherit autotools pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+EXTRA_OECONF = "--disable-dummy-driver"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxext libxfixes"
+PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland"
+
+PACKAGES =+ "${PN}-x11 ${PN}-tpi ${PN}-glx ${PN}-egl ${PN}-wayland"
+
+RDEPENDS_${PN}-tpi =+ "${PN}"
+RDEPENDS_${PN}-x11 =+ "${PN}"
+RDEPENDS_${PN}-glx =+ "${PN}-x11"
+RDEPENDS_${PN}-egl =+ "${PN}-x11"
+
+FILES_${PN}-dbg += "${libdir}/dri/.debug"
+
+FILES_${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}"
+FILES_${PN}-tpi =+ "${libdir}/libva-tpi*${SOLIBS}"
+FILES_${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}"
+FILES_${PN}-egl =+ "${libdir}/libva-egl*${SOLIBS}"
+FILES_${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
similarity index 94%
rename from import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
index c3d2d23..815a75f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb
@@ -10,8 +10,8 @@
 SECTION = "x11/wm"
 DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf libxcursor libxfixes"
 
-# SRCREV tagged 1.2.1
-SRCREV = "9fd1806dfa7c8f2202db18b7bc880857a3019f8c"
+# SRCREV tagged 1.2.2
+SRCREV = "27da947e7fbdf9659f7e5bd1e92af92af6c03970"
 SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \
            file://kbdconfig"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.2.bb
similarity index 79%
rename from import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.2.bb
index a1a8e26..71540cf 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.2.bb
@@ -10,8 +10,8 @@
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "a856ba860b16fdc8c69ee784bc4ade36"
-SRC_URI[sha256sum] = "0ac72649919946070258320aafc320467dd040bcef7b3a225e2ab7241ddffd59"
+SRC_URI[md5sum] = "8dde7a3f5bd9798d0129d1979a5d7640"
+SRC_URI[sha256sum] = "6f83edf2de34f83e701dcb52145d755250a5677580cd413476cc4d7f2d2012d5"
 
 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.0/"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch
new file mode 100644
index 0000000..e49695b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/0001-Use-wayland-scanner-in-the-path.patch
@@ -0,0 +1,37 @@
+From 2f68fcaaf4964e7feeb383f5c26851965cda037c Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 15 Nov 2016 15:20:49 +0200
+Subject: [PATCH] Simplify wayland-scanner lookup
+
+Don't use pkg-config to lookup the path of a binary that's in the path.
+
+Alternatively we'd have to prefix the path returned by pkg-config with
+PKG_CONFIG_SYSROOT_DIR.
+
+Upstream-Status: Pending
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index e56e35a..a92005a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2020,12 +2020,7 @@ if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
+     AC_MSG_ERROR([cannot build egl state tracker without EGL library])
+ fi
+ 
+-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
+-        WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
+-        WAYLAND_SCANNER='')
+-if test "x$WAYLAND_SCANNER" = x; then
+-    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+-fi
++AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+ 
+ # Do per-EGL platform setups and checks
+ egl_platforms=`IFS=', '; echo $with_egl_platforms`
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
deleted file mode 100644
index 48bd325..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 5ec140c17b54c25920091501b665b9aa809cc5e8 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Mon, 11 Jul 2016 10:44:25 -0700
-Subject: mapi: Massage code to allow clang to compile.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-According to https://llvm.org/bugs/show_bug.cgi?id=19778#c3 this code
-was violating the spec, resulting in it failing to compile.
-
-Cc: mesa-stable@lists.freedesktop.org
-Co-authored-by: Tomasz Paweł Gajc <tpgxyz@gmail.com>
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89599
-Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-diff --git a/configure.ac b/configure.ac
-index 3799d8d..1ca8359 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -226,6 +226,7 @@ AX_GCC_FUNC_ATTRIBUTE([packed])
- AX_GCC_FUNC_ATTRIBUTE([pure])
- AX_GCC_FUNC_ATTRIBUTE([returns_nonnull])
- AX_GCC_FUNC_ATTRIBUTE([unused])
-+AX_GCC_FUNC_ATTRIBUTE([visibility])
- AX_GCC_FUNC_ATTRIBUTE([warn_unused_result])
- AX_GCC_FUNC_ATTRIBUTE([weak])
- 
-diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h
-index 38faccc..c5262a1 100644
---- a/src/mapi/entry_x86-64_tls.h
-+++ b/src/mapi/entry_x86-64_tls.h
-@@ -25,6 +25,11 @@
-  *    Chia-I Wu <olv@lunarg.com>
-  */
- 
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
- 
- __asm__(".text\n"
-         ".balign 32\n"
-@@ -54,8 +59,8 @@ entry_patch_public(void)
- {
- }
- 
--static char
--x86_64_entry_start[];
-+extern char
-+x86_64_entry_start[] HIDDEN;
- 
- mapi_func
- entry_get_public(int slot)
-diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h
-index 46d2ece..231b409 100644
---- a/src/mapi/entry_x86_tls.h
-+++ b/src/mapi/entry_x86_tls.h
-@@ -27,6 +27,12 @@
- 
- #include <string.h>
- 
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
-+
- __asm__(".text");
- 
- __asm__("x86_current_tls:\n\t"
-@@ -71,8 +77,8 @@ __asm__(".text");
- extern unsigned long
- x86_current_tls();
- 
--static char x86_entry_start[];
--static char x86_entry_end[];
-+extern char x86_entry_start[] HIDDEN;
-+extern char x86_entry_end[] HIDDEN;
- 
- void
- entry_patch_public(void)
-diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h
-index ea7bacb..03d9735 100644
---- a/src/mapi/entry_x86_tsd.h
-+++ b/src/mapi/entry_x86_tsd.h
-@@ -25,6 +25,11 @@
-  *    Chia-I Wu <olv@lunarg.com>
-  */
- 
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
- 
- #define X86_ENTRY_SIZE 32
- 
-@@ -58,8 +63,8 @@ __asm__(".balign 32\n"
- #include <string.h>
- #include "u_execmem.h"
- 
--static const char x86_entry_start[];
--static const char x86_entry_end[];
-+extern const char x86_entry_start[] HIDDEN;
-+extern const char x86_entry_end[] HIDDEN;
- 
- void
- entry_patch_public(void)
--- 
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
index e4461ef..0280ee8 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
@@ -2,16 +2,25 @@
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Upstream-Status: Pending
-Index: mesa-11.1.1/src/gallium/include/pipe/p_config.h
-===================================================================
---- mesa-11.1.1.orig/src/gallium/include/pipe/p_config.h
-+++ mesa-11.1.1/src/gallium/include/pipe/p_config.h
-@@ -130,7 +130,7 @@
-  * Endian detection.
-  */
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ src/util/u_endian.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/u_endian.h b/src/util/u_endian.h
+index b9d563d..2d5eab9 100644
+--- a/src/util/u_endian.h
++++ b/src/util/u_endian.h
+@@ -27,7 +27,7 @@
+ #ifndef U_ENDIAN_H
+ #define U_ENDIAN_H
  
--#ifdef __GLIBC__
+-#if defined(__GLIBC__) || defined(ANDROID)
 +#if defined(__linux__)
  #include <endian.h>
  
  #if __BYTE_ORDER == __LITTLE_ENDIAN
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/libglu_9.0.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/libglu_9.0.0.bb
index 010998d..8b94613 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/libglu_9.0.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/libglu_9.0.0.bb
@@ -24,7 +24,7 @@
 inherit autotools pkgconfig distro_features_check
 
 # Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES = "x11 opengl"
 
 # Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
 RDEPENDS_${PN}-dev = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
index fab0bdb..e43b9ef 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
@@ -30,7 +30,7 @@
                   x11 glew glu glx"
 
 # The Wayland code doesn't work with Wayland 1.0, so disable it for now
-#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
+#${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}"
 
 EXTRA_OECONF = "--with-system-data-files"
 
@@ -40,7 +40,7 @@
 PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
 PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
 PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,"
+PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,freeglut"
 PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
 PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg"
 PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.0.2.bb
similarity index 66%
rename from import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.0.2.bb
index f06a3e9..e3604f3 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_17.0.2.bb
@@ -8,6 +8,6 @@
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "dri ${MESA_CRYPTO} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ??= "dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 
 EXCLUDE_FROM_WORLD = "1"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
index 525a2d5..25cbf63 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
@@ -14,7 +14,7 @@
 
 PE = "2"
 
-DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native udev"
+DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native"
 
 PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa"
 
@@ -22,13 +22,12 @@
 
 REQUIRED_DISTRO_FEATURES = "opengl"
 
+export LLVM_CONFIG = "${STAGING_BINDIR_CROSS}/llvm-config"
 EXTRA_OECONF = "--enable-shared-glapi"
 
-PACKAGECONFIG ??= "gbm egl gles dri ${MESA_CRYPTO} \
-		${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
-		${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\
+PACKAGECONFIG ??= "gbm egl gles dri \
+		${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)} \
 		"
-
 PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
 
 X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
@@ -42,6 +41,10 @@
 PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, dri2proto libdrm"
 PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, dri3proto presentproto libxshmfence"
 
+# Vulkan drivers need dri3 enabled
+# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
+PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=intel, --without-vulkan-drivers"
+
 PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
 
 EGL_PLATFORMS  = "drm"
@@ -49,7 +52,12 @@
 EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'wayland', ',wayland', '', d)}"
 PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl"
 
+PACKAGECONFIG[etnaviv] = ""
+PACKAGECONFIG[imx] = ""
+
 GALLIUMDRIVERS = "swrast"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'imx', ',imx', '', d)}"
 GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
 PACKAGECONFIG[r600] = ""
 GALLIUMDRIVERS_LLVM33_ENABLED = "${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
@@ -64,11 +72,8 @@
 export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
 PACKAGECONFIG[xa]  = "--enable-xa, --disable-xa"
 
-# Mesa requires one of the following crypto implementation, pick one of them
-MESA_CRYPTO ??= "openssl"
-PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
-PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
-PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
+OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}"
+PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
 
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
@@ -91,9 +96,8 @@
              libgles2-mesa libgles2-mesa-dev \
              libgles3-mesa libgles3-mesa-dev \
              libwayland-egl libwayland-egl-dev \
-             libxvmcsoftpipe libxvmcsoftpipe-dev \
              libxatracker libxatracker-dev \
-             mesa-megadriver \
+             mesa-megadriver mesa-vulkan-drivers \
             "
 
 do_install_append () {
@@ -111,7 +115,7 @@
 # they don't get Debian-renamed (which would remove the -mesa suffix), and
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
-    pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
+    pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
     for p in (("egl", "libegl", "libegl1"),
               ("dri", "libgl", "libgl1"),
               ("gles", "libgles1", "libglesv1-cm1"),
@@ -145,7 +149,7 @@
         d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
 
     import re
-    dri_drivers_root = oe.path.join(d.getVar('PKGD', True), d.getVar('libdir', True), "dri")
+    dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
     if os.path.isdir(dri_drivers_root):
         dri_pkgs = os.listdir(dri_drivers_root)
         lib_name = d.expand("${MLPREFIX}mesa-megadriver")
@@ -157,7 +161,7 @@
                 d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
                 d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
 
-    pipe_drivers_root = os.path.join(d.getVar('libdir', True), "gallium-pipe")
+    pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
     do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
 }
 
@@ -167,6 +171,7 @@
 
 FILES_${PN} += "${sysconfdir}/drirc"
 FILES_mesa-megadriver = "${libdir}/dri/*"
+FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
 FILES_libegl-mesa = "${libdir}/libEGL.so.*"
 FILES_libgbm = "${libdir}/libgbm.so.*"
 FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*"
@@ -175,10 +180,9 @@
 FILES_libglapi = "${libdir}/libglapi.so.*"
 FILES_libosmesa = "${libdir}/libOSMesa.so.*"
 FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*"
-FILES_libxvmcsoftpipe = "${libdir}/libXvMCsoftpipe.so.*"
 FILES_libxatracker = "${libdir}/libxatracker.so.*"
 
-FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc"
+FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan"
 FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
 FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
 FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
@@ -186,9 +190,8 @@
 FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
 FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
 FILES_libgles3-mesa-dev = "${includedir}/GLES3"
-FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
+FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
 FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*"
-FILES_libxvmcsoftpipe-dev = "${libdir}/libXvMCsoftpipe.so ${libdir}/libXvMCsoftpipe.la"
 FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
                           ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
                           ${libdir}/pkgconfig/xatracker.pc"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_12.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.0.2.bb
similarity index 67%
rename from import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_12.0.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.0.2.bb
index 80189e3..2689e8f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_12.0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/mesa/mesa_17.0.2.bb
@@ -1,13 +1,13 @@
 require ${BPN}.inc
 
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/mesa-${PV}.tar.xz \
            file://replace_glibc_check_with_linux.patch \
-           file://clang-compile-PR89599.patch \
            file://disable-asm-on-non-gcc.patch \
+           file://0001-Use-wayland-scanner-in-the-path.patch \
 "
 
-SRC_URI[md5sum] = "972fd5ad5a63aeabf173fb9adefc6522"
-SRC_URI[sha256sum] = "bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389"
+SRC_URI[md5sum] = "8f808e92b893d412fbd6510e1d16f5c5"
+SRC_URI[sha256sum] = "f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4"
 
 #because we cannot rely on the fact that all apps will use pkgconfig,
 #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
index 6b50028..97dcac5 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11-xserver.bb
@@ -11,7 +11,7 @@
 # rdepends on XSERVER
 REQUIRED_DISTRO_FEATURES = "x11"
 
-XSERVER ?= "xserver-xorg xf86-video-fbdev xf86-input-evdev"
+XSERVER ?= "xserver-xorg xf86-video-fbdev"
 XSERVERCODECS ?= ""
 
 RDEPENDS_${PN} = "\
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
index 4291424..001db9e 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-x11.bb
@@ -5,13 +5,12 @@
 PR = "r40"
 
 inherit packagegroup distro_features_check
-# rdepends on x11-common
 REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGES = "${PN} ${PN}-utils"
 
-# xserver-common, x11-common
-VIRTUAL-RUNTIME_xserver_common ?= "x11-common"
+# backwards compatibility for xserver-common
+VIRTUAL-RUNTIME_xserver_common ?= ""
 
 # elsa, xserver-nodm-init
 VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init"
@@ -30,4 +29,8 @@
     xhost \
     xset \
     xrandr \
+    xmodmap \
+    xdpyinfo \
+    xinput-calibrator \
+    dbus-x11 \
     "
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.3.bb
similarity index 88%
rename from import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.3.bb
index f9f344a..e259a82 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pango/pango_1.40.3.bb
@@ -17,12 +17,12 @@
             file://0001-Drop-introspection-macros-from-acinclude.m4.patch \
             file://0001-Enforce-recreation-of-docs-pango.types-it-is-build-c.patch \
 "
-SRC_URI[archive.md5sum] = "6fc88c6529890d6c8e03074d57a3eceb"
-SRC_URI[archive.sha256sum] = "e27af54172c72b3ac6be53c9a4c67053e16c905e02addcf3a603ceb2005c1a40"
+SRC_URI[archive.md5sum] = "17c26720f5a862a12f7e1745e2f1d966"
+SRC_URI[archive.sha256sum] = "abba8b5ce728520c3a0f1535eab19eac3c14aeef7faa5aded90017ceac2711d3"
 
 DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
 
 EXTRA_AUTORECONF = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
new file mode 100644
index 0000000..8b63424
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch
@@ -0,0 +1,51 @@
+From 47697aee05a112422acf203982085e7b3e6c05b2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
+Date: Thu, 4 May 2017 00:57:39 -0500
+Subject: [PATCH 1/4] CMake: define GBM_BO_MAP only when symbol is found
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+gbm_bo_map() and _unmap() have been added recently to Mesa,
+and this update may not have reached all implementations of
+GBM, such as the one provided by Mali r6, where said
+definitions can be found in the header file but not in the
+library itself. This leads to errors like the following when
+linking:
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
+  ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
+  collect2: error: ld returned 1 exit status
+  make[2]: *** [bin/point-sprite] Error 1
+
+Instead of relying on the header file, actually try to link
+using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP
+should be defined.
+
+Upstream-Status: Submitted [piglit@lists.freedesktop.org]
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
+Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
+---
+ CMakeLists.txt | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a4ff99e..cc26fa8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -141,8 +141,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ 	if(GBM_FOUND)
+ 		set(PIGLIT_HAS_GBM True)
+ 		add_definitions(-DPIGLIT_HAS_GBM)
+-		if (GBM_VERSION VERSION_EQUAL "12.1" OR GBM_VERSION VERSION_GREATER "12.1")
+-			set(PIGLIT_HAS_GBM_BO_MAP True)
++		set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${GBM_LIBRARIES})
++		CHECK_FUNCTION_EXISTS(gbm_bo_map PIGLIT_HAS_GBM_BO_MAP)
++		if (PIGLIT_HAS_GBM_BO_MAP)
+ 			add_definitions(-DPIGLIT_HAS_GBM_BO_MAP)
+ 		endif()
+ 	endif(GBM_FOUND)
+-- 
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
deleted file mode 100644
index 2e1c947..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-test-utils-with-ldl.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Backport patch to fix build with gold linker.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Backport
-
-
-
-From 93a7113485cf1c55fd7076116faf5b3a690706b2 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 30 Aug 2016 17:17:28 +0300
-Subject: [PATCH] cmake: Link test utils with "-ldl"
-
-Without this linking CXX executables (e.g. fbo-blit-stretch) fails
-with gold linker:
-
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlsym'
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlerror'
-| libpiglitutil_gl.so.0: error: undefined reference to 'dlopen'
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
----
- tests/util/CMakeLists.txt | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
-index e1f8073..3d5bef5 100644
---- a/tests/util/CMakeLists.txt
-+++ b/tests/util/CMakeLists.txt
-@@ -11,6 +11,8 @@ set_source_files_properties(
- 	PROPERTIES GENERATED 1
- 	)
- 
-+link_libraries(${CMAKE_DL_LIBS})
-+
- if(HAVE_LIBCACA)
-     link_libraries(caca)
- endif()
--- 
-2.9.3
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
deleted file mode 100644
index 845804d..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0001-cmake-Link-utils-with-xcb-explicitly.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 73e4fbc5777eddd89bb0fb16e90343551fe3e0ef Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Tue, 5 Jul 2016 10:56:23 +0300
-Subject: [PATCH] cmake: Link utils with xcb explicitly
-
-Linking with g++ can reportedly lead to:
-
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_connect'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_get_setup'
-libpiglitutil_gl.so.0: error: undefined reference to 'xcb_setup_roots_iterator'
-
-This may have appeared now because xcb-dri2 used to overlink publicly
-but now does not.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Accepted
----
- CMakeLists.txt            | 1 +
- tests/util/CMakeLists.txt | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 8e2abba..2e1a473 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -151,6 +151,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- 
- 	pkg_check_modules(LIBDRM QUIET libdrm)
- 	pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel)
-+	pkg_check_modules(XCB QUIET xcb)
- 	pkg_check_modules(XCB_DRI2 QUIET xcb-dri2)
- 	pkg_check_modules(GLPROTO QUIET glproto)
- ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
-index fb22ffa..e1f8073 100644
---- a/tests/util/CMakeLists.txt
-+++ b/tests/util/CMakeLists.txt
-@@ -121,11 +121,13 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- 
- 		list(APPEND UTIL_GL_LIBS
- 			${LIBDRM_LDFLAGS}
-+			${XCB_LDFLAGS}
- 			${XCB_DRI2_LDFLAGS}
- 		)
- 
- 		list(APPEND UTIL_GL_INCLUDES
- 			${LIBDRM_INCLUDE_DIRS}
-+			${XCB_INCLUDE_DIRS}
- 			${XCB_DRI2_INCLUDE_DIRS}
- 		)
- 
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
new file mode 100644
index 0000000..f3aa1ba
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
@@ -0,0 +1,54 @@
+From a6608f218b5023cef36b3de5ec3c5f00b0211d1c Mon Sep 17 00:00:00 2001
+From: Daniel Diaz <daniel.diaz@linaro.org>
+Date: Wed, 17 May 2017 18:00:15 -0500
+Subject: [PATCH 2/4] util/egl: Honour Surfaceless MESA in get_default_display
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The EGL_MESA_platform_surfaceless extension was introduced not too long
+ago. Add support for it our helper.
+
+Upstream-Status: Accepted, since git 7b74602.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+---
+ tests/util/piglit-util-egl.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
+index 106c735..389fe12 100644
+--- a/tests/util/piglit-util-egl.c
++++ b/tests/util/piglit-util-egl.c
+@@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform)
+ 	static bool has_x11 = false;
+ 	static bool has_wayland = false;
+ 	static bool has_gbm = false;
++	static bool has_surfaceless_mesa = false;
+ 
+ 	static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void *native_display, const EGLint *attrib_list);
+ 
+@@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform)
+ 		has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_x11");
+ 		has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_wayland");
+ 		has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_gbm");
++		has_surfaceless_mesa = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless");
+ 
+ 		peglGetPlatformDisplayEXT = (void*) eglGetProcAddress("eglGetPlatformDisplayEXT");
+ 	}
+@@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform)
+ 			return EGL_NO_DISPLAY;
+ 		}
+ 		break;
++	case EGL_PLATFORM_SURFACELESS_MESA:
++		if (!has_surfaceless_mesa) {
++			return EGL_NO_DISPLAY;
++		}
++		break;
+ 	default:
+ 		fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, platform);
+ 		return EGL_NO_DISPLAY;
+-- 
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
new file mode 100644
index 0000000..0f24dc1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
@@ -0,0 +1,36 @@
+From c0dc430b8f5deeacdb11cd188195e16f512af233 Mon Sep 17 00:00:00 2001
+From: Daniel Diaz <daniel.diaz@linaro.org>
+Date: Wed, 17 May 2017 18:00:16 -0500
+Subject: [PATCH 3/4] egl_mesa_platform_surfaceless: Don't use
+ eglGetPlatformDisplay directly
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The entry point is not guaranteed to exist, so use the
+piglit_egl_get_default_display() helper which does the correct thing.
+
+Upstream-Status: Accepted, since git 7b74602.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+---
+ .../spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c  | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
+index 3bbd6aa..81a3919 100644
+--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
++++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
+@@ -31,7 +31,7 @@ test_setup(EGLDisplay *dpy)
+ 
+ 	piglit_require_egl_extension(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless");
+ 
+-	*dpy = eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, NULL, NULL);
++	*dpy = piglit_egl_get_default_display(EGL_PLATFORM_SURFACELESS_MESA);
+ 	if (*dpy == EGL_NO_DISPLAY) {
+ 		printf("failed to get EGLDisplay\n");
+ 		piglit_report_result(PIGLIT_SKIP);
+-- 
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
new file mode 100644
index 0000000..0952af5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
@@ -0,0 +1,78 @@
+From 57de1ff6758ec5ea4a52637f233e3e3150086255 Mon Sep 17 00:00:00 2001
+From: Daniel Diaz <daniel.diaz@linaro.org>
+Date: Wed, 17 May 2017 18:00:17 -0500
+Subject: [PATCH 4/4] egl_mesa_platform_surfaceless: Use EXT functions for
+ surfaces
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+These EXT symbols are guaranteed to exist since they require
+EGL_EXT_platform_base.
+
+Upstream-Status: Accepted, since git 7b74602.
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+---
+ .../egl_mesa_platform_surfaceless.c                | 23 ++++++++++++++++++++--
+ 1 file changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
+index 81a3919..264ed71 100644
+--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
++++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
+@@ -24,6 +24,24 @@
+ #include "piglit-util.h"
+ #include "piglit-util-egl.h"
+ 
++/* Extension function pointers.
++ *
++ * Use prefix 'pegl' (piglit egl) instead of 'egl' to avoid collisions with
++ * prototypes in eglext.h. */
++EGLSurface (*peglCreatePlatformPixmapSurfaceEXT)(EGLDisplay display, EGLConfig config,
++	    NativePixmapType native_pixmap, const EGLint *attrib_list);
++EGLSurface (*peglCreatePlatformWindowSurfaceEXT)(EGLDisplay display, EGLConfig config,
++	    NativeWindowType native_window, const EGLint *attrib_list);
++
++static void
++init_egl_extension_funcs(void)
++{
++	peglCreatePlatformPixmapSurfaceEXT = (void*)
++		eglGetProcAddress("eglCreatePlatformPixmapSurfaceEXT");
++	peglCreatePlatformWindowSurfaceEXT = (void*)
++		eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT");
++}
++
+ static void
+ test_setup(EGLDisplay *dpy)
+ {
+@@ -72,7 +90,7 @@ test_create_window(void *test_data)
+ 
+ 	test_setup(&dpy);
+ 
+-	surf = eglCreatePlatformWindowSurface(dpy, EGL_NO_CONFIG_KHR,
++	surf = peglCreatePlatformWindowSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
+ 					      /*native_window*/ NULL,
+ 					      /*attrib_list*/ NULL);
+ 	if (surf) {
+@@ -103,7 +121,7 @@ test_create_pixmap(void *test_data)
+ 
+ 	test_setup(&dpy);
+ 
+-	surf = eglCreatePlatformPixmapSurface(dpy, EGL_NO_CONFIG_KHR,
++	surf = peglCreatePlatformPixmapSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
+ 					      /*native_window*/ NULL,
+ 					      /*attrib_list*/ NULL);
+ 	if (surf) {
+@@ -205,6 +223,7 @@ main(int argc, char **argv)
+ 		piglit_report_result(PIGLIT_FAIL);
+ 	}
+ 
++	init_egl_extension_funcs();
+ 	result = piglit_run_selected_subtests(subtests, selected_names,
+ 					      num_selected, result);
+ 	piglit_report_result(result);
+-- 
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
index 82adcde..2ea5779 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
@@ -5,23 +5,28 @@
 SRC_URI = "git://anongit.freedesktop.org/piglit \
            file://0001-cmake-install-bash-completions-in-the-right-place.patch \
            file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \
-           file://0001-cmake-Link-utils-with-xcb-explicitly.patch \
-           file://0001-cmake-Link-test-utils-with-ldl.patch \
+           file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch \
+           file://0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch \
+           file://0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch \
+           file://0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch \
            "
 
-# From 2016-07-07
-SRCREV = "c39e41a86551eb390b8da23232dc8577639403d0"
+# From 2017-02-06
+SRCREV = "ca58eec0b965655c7eba592a634cbf4aadfbc675"
 # (when PV goes above 1.0 remove the trailing r)
 PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native"
+DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
 
 inherit cmake python3native distro_features_check bash-completion
 # depends on virtual/libx11
 REQUIRED_DISTRO_FEATURES = "x11"
 
+# depends on virtual/libgl
+REQUIRED_DISTRO_FEATURES += "opengl"
+
 # The built scripts go into the temporary directory according to tempfile
 # (typically /tmp) which can race if multiple builds happen on the same machine,
 # so tell it to use a directory in ${B} to avoid overwriting.
@@ -46,7 +51,7 @@
 	python3-subprocess python3-misc python3-importlib \
 	python3-unixadmin python3-xml python3-multiprocessing \
 	python3-six python3-shell python3-io python3-argparse \
-	mesa-demos bash \
+	python3-netserver mesa-demos bash \
 	"
 
 INSANE_SKIP_${PN} += "dev-so already-stripped"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
index 6c3bcd8..cdfe38a 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/pong-clock/pong-clock_1.0.bb
@@ -2,7 +2,7 @@
 LICENSE = "GPLv2+"
 DEPENDS = "virtual/libx11 xdmcp xau"
 
-inherit distro_features_check
+inherit distro_features_check pkgconfig
 # depends on virtual/libx11
 REQUIRED_DISTRO_FEATURES = "x11"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch
new file mode 100644
index 0000000..694922c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/0001-Use-getenv-if-secure_getenv-does-not-exist.patch
@@ -0,0 +1,34 @@
+From 20525add1df8e1fb13fef90ac068f982def8b958 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 8 Mar 2017 13:23:58 +0200
+Subject: [PATCH] Use getenv() if secure_getenv() does not exist
+
+musl does not implement secure version: default to getenv() in that
+case.
+
+https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1538
+
+Upstream-Status: Pending
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ loader/loader.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/loader/loader.c b/loader/loader.c
+index 24758f4..bff79c1 100644
+--- a/loader/loader.c
++++ b/loader/loader.c
+@@ -54,6 +54,10 @@
+ #endif
+ #endif
+ 
++#if !defined(__secure_getenv)
++#define __secure_getenv getenv
++#endif
++
+ struct loader_struct loader = {0};
+ // TLS for instance for alloc/free callbacks
+ THREAD_LOCAL_DECL struct loader_instance *tls_instance;
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch
new file mode 100644
index 0000000..3cf241d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan/demos-Don-t-build-tri-or-cube.patch
@@ -0,0 +1,106 @@
+commit f63cbe944107b5cd8f150ceaaec43b26099d5688
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Feb 16 10:05:25 2016 -0500
+
+    demos: Don't build tri or cube
+    
+    There are more interesting demos, all we really want here is vulkaninfo.
+    This helps because we don't need to pre-build glslang/llvm/lunarglass
+    just to get the loader and layers.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+--- a/demos/CMakeLists.txt
++++ b/demos/CMakeLists.txt
+@@ -61,46 +61,6 @@
+ else()
+ endif()
+ 
+-if(WIN32)
+-    # For Windows, since 32-bit and 64-bit items can co-exist, we build each in its own build directory.
+-    # 32-bit target data goes in build32, and 64-bit target data goes into build.  So, include/link the
+-    # appropriate data at build time.
+-    if (CMAKE_CL_64)
+-        set (BUILDTGT_DIR build)
+-    else ()
+-        set (BUILDTGT_DIR build32)
+-    endif()
+-
+-    # Use static MSVCRT libraries
+-    foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
+-                             CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+-        if(${configuration} MATCHES "/MD")
+-            string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}")
+-        endif()
+-    endforeach()
+-
+-    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
+-       COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
+-       DEPENDS cube.vert ${GLSLANG_VALIDATOR}
+-       )
+-    add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
+-       COMMAND ${GLSLANG_VALIDATOR} -s -V -o ${CMAKE_BINARY_DIR}/demos/cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
+-       DEPENDS cube.frag ${GLSLANG_VALIDATOR}
+-       )
+-   file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
+-   file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
+-else()
+-    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+-        add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-vert.spv
+-            COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-vert.spv ${PROJECT_SOURCE_DIR}/demos/cube.vert
+-            DEPENDS cube.vert ${GLSLANG_VALIDATOR}
+-            )
+-        add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/demos/cube-frag.spv
+-            COMMAND ${GLSLANG_VALIDATOR} -s -V -o cube-frag.spv ${PROJECT_SOURCE_DIR}/demos/cube.frag
+-            DEPENDS cube.frag ${GLSLANG_VALIDATOR}
+-            )
+-    endif()         
+-endif()
+ 
+ if(WIN32)
+     include_directories (
+@@ -114,43 +74,6 @@
+ add_executable(${API_LOWERCASE}info vulkaninfo.c)
+ target_link_libraries(${API_LOWERCASE}info ${LIBRARIES})
+ 
+-if(NOT WIN32)
+-    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+-        add_executable(cube cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
+-        target_link_libraries(cube ${LIBRARIES})
+-    endif()
+-else()
+-    if (CMAKE_CL_64)
+-        set (LIB_DIR "Win64")
+-    else()
+-        set (LIB_DIR "Win32")
+-    endif()
+-
+-    add_executable(cube WIN32 cube.c ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
+-    target_link_libraries(cube ${LIBRARIES})
+-endif()
+-
+-if(NOT WIN32)
+-    if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
+-        add_executable(cubepp cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
+-        target_link_libraries(cubepp ${LIBRARIES})
+-    endif()
+-else()
+-    if (CMAKE_CL_64)
+-        set (LIB_DIR "Win64")
+-    else()
+-        set (LIB_DIR "Win32")
+-    endif()
+-
+-    add_executable(cubepp WIN32 cube.cpp ${CMAKE_BINARY_DIR}/demos/cube-vert.spv ${CMAKE_BINARY_DIR}/demos/cube-frag.spv)
+-    target_link_libraries(cubepp ${LIBRARIES})
+-endif()
+-
+-if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}))
+-    if  ((DEMOS_WSI_SELECTION STREQUAL "XCB") OR (DEMOS_WSI_SELECTION STREQUAL "WAYLAND") OR WIN32 OR (CMAKE_SYSTEM_NAME STREQUAL "Android"))
+-        add_subdirectory(smoke)
+-    endif()
+-endif()
+ 
+ if(UNIX)
+     install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb
new file mode 100644
index 0000000..45d1c49
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/vulkan/vulkan_1.0.39.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "3D graphics and compute API common loader"
+DESCRIPTION = "Vulkan is a new generation graphics and compute API \
+that provides efficient access to modern GPUs. These packages \
+provide only the common vendor-agnostic library loader, headers and \
+the vulkaninfo utility."
+HOMEPAGE = "https://www.khronos.org/vulkan/"
+BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers"
+SECTION = "libs"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99c647ca3d4f6a4b9d8628f757aad156 \
+                    file://loader/loader.c;endline=25;md5=a87cd5442291c23d1fce4eece4cfde9d"
+SRC_URI = "git://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers.git;branch=sdk-1.0.39 \
+           file://demos-Don-t-build-tri-or-cube.patch \
+           file://0001-Use-getenv-if-secure_getenv-does-not-exist.patch \
+"
+SRCREV = "9c21ed0fb275589c3af6118aec9ef4f1d1544dc1"
+
+S = "${WORKDIR}/git"
+
+
+inherit cmake python3native lib_package distro_features_check
+ANY_OF_DISTRO_FEATURES = "x11 wayland"
+
+EXTRA_OECMAKE = "-DBUILD_WSI_MIR_SUPPORT=OFF \
+                 -DBUILD_LAYERS=OFF \
+                 -DBUILD_TESTS=OFF"
+
+# must choose x11 or wayland or both
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}"
+PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON -DDEMOS_WSI_SELECTION=XCB, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF -DDEMOS_WSI_SELECTION=WAYLAND, libxcb libx11 libxrandr"
+PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
index f7db1bc..a5179db 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -20,18 +20,21 @@
 # libx11 requires x11 in DISTRO_FEATURES.
 REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
 
+# virtual/libgl requires opengl in DISTRO_FEATURES.
+REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/${MLPREFIX}libgl', 'opengl', '', d)}"
+
 # I say virtual/libgl, actually wants gl.pc
-PACKAGECONFIG[glx] = "-Dwaffle_has_glx=1,-Dwaffle_has_glx=0,virtual/libgl libx11"
+PACKAGECONFIG[glx] = "-Dwaffle_has_glx=1,-Dwaffle_has_glx=0,virtual/${MLPREFIX}libgl libx11"
 
 # I say virtual/libgl, actually wants wayland-egl.pc, egl.pc, and the wayland
 # DISTRO_FEATURE.
-PACKAGECONFIG[wayland] = "-Dwaffle_has_wayland=1,-Dwaffle_has_wayland=0,virtual/libgl wayland"
+PACKAGECONFIG[wayland] = "-Dwaffle_has_wayland=1,-Dwaffle_has_wayland=0,virtual/${MLPREFIX}libgl wayland"
 
 # I say virtual/libgl, actually wants gbm.pc egl.pc
-PACKAGECONFIG[gbm] = "-Dwaffle_has_gbm=1,-Dwaffle_has_gbm=0,virtual/libgl udev"
+PACKAGECONFIG[gbm] = "-Dwaffle_has_gbm=1,-Dwaffle_has_gbm=0,virtual/${MLPREFIX}libgl udev"
 
 # I say virtual/libgl, actually wants egl.pc
-PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=1,-Dwaffle_has_x11_egl=0,virtual/libgl libxcb"
+PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=1,-Dwaffle_has_x11_egl=0,virtual/${MLPREFIX}libgl libxcb"
 
 FILES_${PN}-dev += "${datadir}/cmake/Modules/FindWaffle.cmake \
                     ${libdir}/cmake/Waffle/"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.4.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.6.1.bb
similarity index 84%
rename from import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.4.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.6.1.bb
index 3580392..c8714f2 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.4.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/libinput_1.6.1.bb
@@ -10,8 +10,8 @@
 SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
            file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
 "
-SRC_URI[md5sum] = "2e7ba577ed74d8d1baeb07dbd4fb912a"
-SRC_URI[sha256sum] = "26e7b3ab499358caba499705680ea7e5851af2bd37dc32f2be64181610d6392a"
+SRC_URI[md5sum] = "7e282344f8ed7ec5cf87ca9fc22674fb"
+SRC_URI[sha256sum] = "9d816f13eee63bcca0e9c3bb652c52ab55f39be4d1b90b54e4bfd1dc92ef55a8"
 
 inherit autotools pkgconfig
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch
deleted file mode 100644
index dece95c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland/0001-scanner-Use-unit32_t-instead-of-uint.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5516d32e694badca35b6c71b02a3f08f650308bf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 15 Jul 2016 16:23:48 -0700
-Subject: [PATCH] scanner: Use unit32_t instead of uint
-
-uint32_t is C99 defined stdint type
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- src/scanner.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/scanner.c b/src/scanner.c
-index 5f06e8e..10a4023 100644
---- a/src/scanner.c
-+++ b/src/scanner.c
-@@ -808,7 +808,7 @@ find_enumeration(struct protocol *protocol,
- 	struct interface *i;
- 	struct enumeration *e;
- 	char *enum_name;
--	uint idx = 0, j;
-+	uint32_t idx = 0, j;
- 
- 	for (j = 0; j + 1 < strlen(enum_attribute); j++) {
- 		if (enum_attribute[j] == '.') {
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb
similarity index 88%
rename from import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.11.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb
index 3413406..b9396b6 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.11.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/wayland_1.13.0.bb
@@ -10,21 +10,17 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
                     file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
 
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-           file://0001-scanner-Use-unit32_t-instead-of-uint.patch \
-           "
-SRC_URI[md5sum] = "fccf680be066e234729d5b69e0bd0fa9"
-SRC_URI[sha256sum] = "9540925f7928becfdf5e3b84c70757f6589bf1ceef09bea78784d8e4772c0db0"
+DEPENDS = "expat libxml2 libffi wayland-native"
 
-EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+           "
+SRC_URI[md5sum] = "cae152ed956da6de53f9727bc1c45039"
+SRC_URI[sha256sum] = "69b052c031a61e89af7cc8780893d0da1e301492352aa449dee9345043e6fe51"
 
 inherit autotools pkgconfig
 
-BBCLASSEXTEND = "native nativesdk"
-
-DEPENDS = "expat libxml2 libffi wayland-native"
-
 EXTRA_OECONF = "--disable-documentation --with-host-scanner"
+EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
 
 # Wayland installs a M4 macro for other projects to use, which uses the target
 # pkg-config to find files.  Replace pkg-config with pkg-config-native.
@@ -41,3 +37,5 @@
 
 FILES_${PN} = "${libdir}/*${SOLIBS}"
 FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
index 291cd16..22ba5f3 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
 SRC_URI = "file://init \
            file://weston.service \
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
index 00118d7..5f4d79c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
@@ -13,22 +13,17 @@
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Upstream-Status: Inappropriate [embedded specific]
 ---
- configure.ac | 2 +-
+ configure.ac |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/configure.ac b/configure.ac
-index bc7c329..15a05d3 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.8.0])
+@@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib
  PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
  
- PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
+ PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7],
 -		  [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
 +		  [ac_wayland_protocols_pkgdatadir=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
  AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
  
  AC_ARG_ENABLE(wayland-compositor, [  --enable-wayland-compositor],,
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
index 148848d..e2213ac 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -10,17 +10,15 @@
 ---
 Upstream-Status: Submitted
 
- configure.ac        |  2 ++
- src/weston-error.h  | 20 ++++++++++++++++++++
- src/weston-launch.c |  2 +-
+ configure.ac              |    2 ++
+ libweston/weston-error.h  |   20 ++++++++++++++++++++
+ libweston/weston-launch.c |    2 +-
  3 files changed, 23 insertions(+), 1 deletion(-)
  create mode 100644 src/weston-error.h
 
-diff --git a/configure.ac b/configure.ac
-index 263fc22..f52cd62 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -57,6 +57,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+@@ -60,6 +60,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
  	      [[#include <time.h>]])
  AC_CHECK_HEADERS([execinfo.h])
  
@@ -28,12 +26,9 @@
 +
  AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
  
- COMPOSITOR_MODULES="wayland-server >= 1.7.93 pixman-1 >= 0.25.2"
-diff --git a/src/weston-error.h b/src/weston-error.h
-new file mode 100644
-index 0000000..2089d02
+ COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
 --- /dev/null
-+++ b/src/weston-error.h
++++ b/libweston/weston-error.h
 @@ -0,0 +1,20 @@
 +#ifndef _WESTON_ERROR_H
 +#define _WESTON_ERROR_H
@@ -55,11 +50,9 @@
 +
 +#endif
 +
-diff --git a/src/weston-launch.c b/src/weston-launch.c
-index 10c66de..3e6d30a 100644
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
-@@ -30,7 +30,6 @@
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
+@@ -33,7 +33,6 @@
  #include <poll.h>
  #include <errno.h>
  
@@ -67,7 +60,7 @@
  #include <getopt.h>
  
  #include <sys/types.h>
-@@ -56,6 +55,7 @@
+@@ -59,6 +58,7 @@
  #endif
  
  #include "weston-launch.h"
@@ -75,6 +68,3 @@
  
  #define DRM_MAJOR 226
  
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
deleted file mode 100644
index 91ef727..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ba02b8abe4e2afac2bfbf2559972d5059d75a041 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 16 Jul 2016 22:50:19 +0300
-Subject: [PATCH weston] shared: include stdint.h for int32_t
-
-This fixes build on musl.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- shared/xalloc.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/shared/xalloc.h b/shared/xalloc.h
-index 85fccb4..484de2d 100644
---- a/shared/xalloc.h
-+++ b/shared/xalloc.h
-@@ -30,6 +30,7 @@
- extern "C" {
- #endif
- 
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- 
--- 
-2.1.4
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index 5542036..70b9888 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -1,6 +1,6 @@
-From d02226b3d5872b184c1d50c7f4706ac9467ffb81 Mon Sep 17 00:00:00 2001
+From 8ff6ed03ec4079f32e9b34085414e57be4730e04 Mon Sep 17 00:00:00 2001
 From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Fri, 15 Jul 2016 11:00:15 +0300
+Date: Wed, 22 Feb 2017 15:53:30 +0200
 Subject: [PATCH] weston-launch: Provide a default version that doesn't require
  PAM
 
@@ -13,16 +13,17 @@
 Upstream-Status: Pending
 
 Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
 ---
- configure.ac        |  9 +++++++--
- src/weston-launch.c | 20 ++++++++++++++++++++
+ configure.ac              |  9 +++++++--
+ libweston/weston-launch.c | 20 ++++++++++++++++++++
  2 files changed, 27 insertions(+), 2 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 32fdde7..240966f 100644
+index 46cb2c7..bb45f46 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -416,13 +416,17 @@ AC_ARG_ENABLE(resize-optimization,
+@@ -435,13 +435,17 @@ AC_ARG_ENABLE(resize-optimization,
  AS_IF([test "x$enable_resize_optimization" = "xyes"],
        [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
  
@@ -30,11 +31,11 @@
 +            AS_HELP_STRING([--with-pam], [Use PAM]),
 +            [use_pam=$withval], [use_pam=yes])
  AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
- AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
--if test x$enable_weston_launch == xyes; then
+ AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes)
+-if test x$enable_weston_launch = xyes; then
 +if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
    WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
-   if test x$have_pam == xno; then
+   if test x$have_pam = xno; then
 -    AC_ERROR([weston-launch requires pam])
 +    AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
    fi
@@ -42,7 +43,7 @@
  fi
  
  AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
-@@ -673,6 +677,7 @@ AC_MSG_RESULT([
+@@ -701,6 +705,7 @@ AC_MSG_RESULT([
  	Enable developer documentation	${enable_devdocs}
  
  	weston-launch utility		${enable_weston_launch}
@@ -50,10 +51,10 @@
  	systemd-login support		${have_systemd_login}
  	systemd notify support		${enable_systemd_notify}
  
-diff --git a/src/weston-launch.c b/src/weston-launch.c
-index b8b2ba0..a865061 100644
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
+diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
+index 0491896..07e7469 100644
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
 @@ -51,7 +51,9 @@
  
  #include <pwd.h>
@@ -107,7 +108,7 @@
  
  	if (ioctl(wl->tty, KDSKBMUTE, 0) &&
  	    ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
-@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl)
+@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
  	setenv("HOME", wl->pw->pw_dir, 1);
  	setenv("SHELL", wl->pw->pw_shell, 1);
  
@@ -115,15 +116,15 @@
  	env = pam_getenvlist(wl->ph);
  	if (env) {
  		for (i = 0; env[i]; ++i) {
-@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl)
+@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
  		}
  		free(env);
  	}
 +#endif
- }
  
- static void
-@@ -665,7 +675,9 @@ static void
+ 	/*
+ 	 * We open a new session, so it makes sense
+@@ -675,7 +685,9 @@ static void
  help(const char *name)
  {
  	fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
@@ -133,7 +134,7 @@
  	fprintf(stderr, "  -t, --tty       Start session on alternative tty\n");
  	fprintf(stderr, "  -v, --verbose   Be verbose\n");
  	fprintf(stderr, "  -h, --help      Display this help message\n");
-@@ -678,7 +690,9 @@ main(int argc, char *argv[])
+@@ -688,7 +700,9 @@ main(int argc, char *argv[])
  	int i, c;
  	char *tty = NULL;
  	struct option opts[] = {
@@ -143,7 +144,7 @@
  		{ "tty",     required_argument, NULL, 't' },
  		{ "verbose", no_argument,       NULL, 'v' },
  		{ "help",    no_argument,       NULL, 'h' },
-@@ -690,9 +704,13 @@ main(int argc, char *argv[])
+@@ -700,9 +714,13 @@ main(int argc, char *argv[])
  	while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) {
  		switch (c) {
  		case 'u':
@@ -157,7 +158,7 @@
  			break;
  		case 't':
  			tty = optarg;
-@@ -730,8 +748,10 @@ main(int argc, char *argv[])
+@@ -740,8 +758,10 @@ main(int argc, char *argv[])
  	if (setup_tty(&wl, tty) < 0)
  		exit(EXIT_FAILURE);
  
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
deleted file mode 100644
index 0c408a4..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e8b615250f700f7854b423aaaf0a0aeea92c05a9 Mon Sep 17 00:00:00 2001
-From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Sat, 7 May 2016 08:51:58 -0300
-Subject: [PATCH] weston-launch: Handle invalid command line options
-Organization: O.S. Systems Software LTDA.
-
-Exit the program if an unrecognized command line option is found.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----
-
- src/weston-launch.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/weston-launch.c b/src/weston-launch.c
-index b8dfb17..9987d8e 100644
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
-@@ -703,6 +703,8 @@ main(int argc, char *argv[])
- 		case 'h':
- 			help("weston-launch");
- 			exit(EXIT_FAILURE);
-+		default:
-+			exit(EXIT_FAILURE);
- 		}
- 	}
- 
--- 
-2.8.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
deleted file mode 100644
index 6f5ad66..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-1.11-config-option-for-no-input-device.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From bbf2e6ebbd9c051775f43e1e3c3a2f41322342e8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
-Date: Fri, 21 Oct 2016 14:03:13 -0500
-Subject: [PATCH] Add configuration option for no input device.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[Backported from master, 75b7197.]
-
-As it has been discussed in the past [1], running Weston
-without any input device at launch might be beneficial for
-some use cases.
-
-Certainly, it's best for the vast majority of users (and
-the project) to require an input device to be present, as
-to avoid frustration and hassle, but for those brave souls
-that so prefer, this patch lets them run without any input
-device at all.
-
-This introduces a simple configuration in weston.ini:
-  [core]
-  require-input=true
-
-True is the default, so no behavioral change is introduced.
-
-[1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
-
-Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
----
- man/weston.ini.man  | 5 +++++
- src/compositor.h    | 4 ++++
- src/libinput-seat.c | 6 ++++++
- src/main.c          | 5 +++++
- weston.ini.in       | 1 +
- 5 files changed, 21 insertions(+)
-
-diff --git a/man/weston.ini.man b/man/weston.ini.man
-index d7c4a6f..c7d0f01 100644
---- a/man/weston.ini.man
-+++ b/man/weston.ini.man
-@@ -169,6 +169,11 @@ time, the one specified in the command-line will be used. On the other
- hand, if none of these sets the value, default idle timeout will be
- set to 300 seconds.
- .RS
-+.PP
-+.RE
-+.TP 7
-+.BI "require-input=" true
-+require an input device for launch
- 
- .SH "LIBINPUT SECTION"
- The
-diff --git a/src/compositor.h b/src/compositor.h
-index 0bbf458..476b650 100644
---- a/src/compositor.h
-+++ b/src/compositor.h
-@@ -803,6 +803,10 @@ struct weston_compositor {
- 
- 	void *user_data;
- 	void (*exit)(struct weston_compositor *c);
-+
-+	/* Whether to let the compositor run without any input device. */
-+	bool require_input;
-+
- };
- 
- struct weston_buffer {
-diff --git a/src/libinput-seat.c b/src/libinput-seat.c
-index 8ce0ee0..e1fdcf0 100644
---- a/src/libinput-seat.c
-+++ b/src/libinput-seat.c
-@@ -255,6 +255,12 @@ udev_input_enable(struct udev_input *input)
- 			devices_found = 1;
- 	}
- 
-+	if (devices_found == 0 && !c->require_input) {
-+		weston_log("warning: no input devices found, but none required "
-+			   "as per configuration.\n");
-+		return 0;
-+	}
-+
- 	if (devices_found == 0) {
- 		weston_log(
- 			"warning: no input devices on entering Weston. "
-diff --git a/src/main.c b/src/main.c
-index 3279ac6..09905ea 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -1298,6 +1298,7 @@ int main(int argc, char *argv[])
- 	struct wl_client *primary_client;
- 	struct wl_listener primary_client_destroyed;
- 	struct weston_seat *seat;
-+	int require_input;
- 
- 	const struct weston_option core_options[] = {
- 		{ WESTON_OPTION_STRING, "backend", 'B', &backend },
-@@ -1373,6 +1374,10 @@ int main(int argc, char *argv[])
- 	if (weston_compositor_init_config(ec, config) < 0)
- 		goto out;
- 
-+	weston_config_section_get_bool(section, "require-input",
-+				       &require_input, true);
-+	ec->require_input = require_input;
-+
- 	if (load_backend(ec, backend, &argc, argv, config) < 0) {
- 		weston_log("fatal: failed to create compositor backend\n");
- 		goto out;
-diff --git a/weston.ini.in b/weston.ini.in
-index 14a4c0c..d837fb5 100644
---- a/weston.ini.in
-+++ b/weston.ini.in
-@@ -2,6 +2,7 @@
- #modules=xwayland.so,cms-colord.so
- #shell=desktop-shell.so
- #gbm-format=xrgb2101010
-+#require-input=true
- 
- [shell]
- background-image=/usr/share/backgrounds/gnome/Aqua.jpg
--- 
-1.9.1
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
new file mode 100644
index 0000000..c188018
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston/weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch
@@ -0,0 +1,55 @@
+Multi-plane sub-sampled textures have partial width/height, e.g.
+YUV420/I420 has a full-size Y plane, followed by a half-width/height U
+plane, and a half-width/height V plane.
+
+zwp_linux_dmabuf_v1 allows clients to pass an explicit pitch for each
+plane, but for wl_shm this must be inferred. gl-renderer was correctly
+accounting for the width and height when subsampling, but the pitch was
+being taken as the pitch for the first plane.
+
+This does not match the requirements for GStreamer's waylandsink, in
+particular, as well as other clients. Fix the SHM upload path to
+correctly set the pitch for each plane, according to subsampling.
+
+Tested with:
+  $ gst-launch-1.0 videotestsrc ! waylandsink
+
+Upstream-Status: Backport [https://patchwork.freedesktop.org/patch/180767/]
+
+Signed-off-by: Daniel Stone <daniels@collabora.com>
+Fixes: fdeefe42418 ("gl-renderer: add support of WL_SHM_FORMAT_YUV420")
+Reported-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103063
+
+---
+ libweston/gl-renderer.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
+index 244ce309..40bf0bb6 100644
+--- a/libweston/gl-renderer.c
++++ b/libweston/gl-renderer.c
+@@ -1285,14 +1285,13 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ 		goto done;
+ 	}
+ 
+-	glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch);
+-
+ 	if (gs->needs_full_upload) {
+ 		glPixelStorei(GL_UNPACK_SKIP_PIXELS_EXT, 0);
+ 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, 0);
+ 		wl_shm_buffer_begin_access(buffer->shm_buffer);
+ 		for (j = 0; j < gs->num_textures; j++) {
+ 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ 			glTexImage2D(GL_TEXTURE_2D, 0,
+ 				     gs->gl_format[j],
+ 				     gs->pitch / gs->hsub[j],
+@@ -1317,6 +1316,7 @@ gl_renderer_flush_damage(struct weston_surface *surface)
+ 		glPixelStorei(GL_UNPACK_SKIP_ROWS_EXT, r.y1);
+ 		for (j = 0; j < gs->num_textures; j++) {
+ 			glBindTexture(GL_TEXTURE_2D, gs->textures[j]);
++			glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, gs->pitch / gs->hsub[j]);
+ 			glTexSubImage2D(GL_TEXTURE_2D, 0,
+ 					r.x1 / gs->hsub[j],
+ 					r.y1 / gs->vsub[j],
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.11.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb
similarity index 78%
rename from import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.11.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb
index 9740ce9..063494c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_1.11.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/wayland/weston_2.0.0.bb
@@ -3,21 +3,19 @@
 HOMEPAGE = "http://wayland.freedesktop.org"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
-                    file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
+                    file://libweston/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38"
 
 SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://weston.png \
            file://weston.desktop \
            file://0001-make-error-portable.patch \
            file://0001-configure.ac-Fix-wayland-protocols-path.patch \
-           file://0001-shared-include-stdint.h-for-int32_t.patch \
            file://xwayland.weston-start \
-           file://make-weston-launch-exit-for-unrecognized-option.patch \
            file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
-           file://weston-1.11-config-option-for-no-input-device.patch \
+           file://weston-gl-renderer-Set-pitch-correctly-for-subsampled-textures.patch \
 "
-SRC_URI[md5sum] = "bc6f90a2039163804aecfa663b69c4c2"
-SRC_URI[sha256sum] = "05e086e9f186a06843b9f7a5e1abf19347b1a6e4be26d7e74927abc17b6b7125"
+SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
+SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
 
 inherit autotools pkgconfig useradd distro_features_check
 # depends on virtual/egl
@@ -27,12 +25,9 @@
 DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
 
 EXTRA_OECONF = "--enable-setuid-install \
-                --disable-rpi-compositor \
                 --disable-rdp-compositor \
-                WAYLAND_PROTOCOLS_SYSROOT_DIR=${STAGING_DIR}/${MACHINE} \
+                WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
                 "
-EXTRA_OECONF[vardepsexclude] = "MACHINE"
-
 EXTRA_OECONF_append_qemux86 = "\
 		WESTON_NATIVE_BACKEND=fbdev-backend.so \
 		"
@@ -40,10 +35,8 @@
 		WESTON_NATIVE_BACKEND=fbdev-backend.so \
 		"
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
                    clients launch"
 #
 # Compositor choices
@@ -85,10 +78,10 @@
 
 do_install_append() {
 	# Weston doesn't need the .la files to load modules, so wipe them
-	rm -f ${D}/${libdir}/weston/*.la
+	rm -f ${D}/${libdir}/libweston-2/*.la
 
 	# If X11, ship a desktop file to launch it
-	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
 		install -d ${D}${datadir}/applications
 		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
 
@@ -101,13 +94,17 @@
 	fi
 }
 
-PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)}"
-PACKAGES += "${PN}-examples"
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
+             libweston-2 ${PN}-examples"
 
 FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+
+FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
+SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
+
 FILES_${PN}-examples = "${bindir}/*"
 
-FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
+FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
 RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
 
 RDEPENDS_${PN} += "xkeyboard-config"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
deleted file mode 100644
index f5b69dd..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xdefaults
+++ /dev/null
@@ -1,3 +0,0 @@
-Rxvt*scrollBar_right: true
-Rxvt*font: xft:Mono:pixelsize=9
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
deleted file mode 100644
index a9d102c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-# kdrive 1.4 does not have default keymap in server
-#xmodmap - </etc/X11/default.xmodmap
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap
deleted file mode 100644
index 05a13fa..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/default.xmodmap
+++ /dev/null
@@ -1,260 +0,0 @@
-keycode   8 =
-keycode   9 = Escape
-keycode  10 = 1 exclam
-keycode  11 = 2 at
-keycode  12 = 3 numbersign
-keycode  13 = 4 dollar
-keycode  14 = 5 percent
-keycode  15 = 6 asciicircum
-keycode  16 = 7 ampersand braceleft
-keycode  17 = 8 asterisk bracketleft
-keycode  18 = 9 parenleft bracketright
-keycode  19 = 0 parenright braceright
-keycode  20 = minus underscore backslash
-keycode  21 = equal plus
-keycode  22 = BackSpace
-keycode  23 = Tab
-keycode  24 = q Q q
-keycode  25 = w W w
-keycode  26 = e E
-keycode  27 = r R r
-keycode  28 = t T t
-keycode  29 = y Y y
-keycode  30 = u U u
-keycode  31 = i I i
-keycode  32 = o O o
-keycode  33 = p P p
-keycode  34 = bracketleft braceleft
-keycode  35 = bracketright braceright asciitilde
-keycode  36 = Return
-keycode  37 = Control_L
-keycode  38 = a A
-keycode  39 = s S s
-keycode  40 = d D
-keycode  41 = f F
-keycode  42 = g G g
-keycode  43 = h H h
-keycode  44 = j J j
-keycode  45 = k K k
-keycode  46 = l L l
-keycode  47 = semicolon colon
-keycode  48 = apostrophe quotedbl
-keycode  49 = grave asciitilde
-keycode  50 = Shift_L
-keycode  51 = backslash bar
-keycode  52 = z Z z
-keycode  53 = x X x
-keycode  54 = c C
-keycode  55 = v V v
-keycode  56 = b B
-keycode  57 = n N n
-keycode  58 = m M m
-keycode  59 = comma less
-keycode  60 = period greater
-keycode  61 = slash question
-keycode  62 = Shift_R
-keycode  63 = KP_Multiply
-keycode  64 = Alt_L
-keycode  65 = space
-keycode  66 = Caps_Lock
-keycode  67 = F1 F11
-keycode  68 = F2 F12
-keycode  69 = F3 F13
-keycode  70 = F4 F14
-keycode  71 = F5 F15
-keycode  72 = F6 F16
-keycode  73 = F7 F17
-keycode  74 = F8 F18
-keycode  75 = F9 F19
-keycode  76 = F10 F20
-keycode  77 = Num_Lock
-keycode  78 = Scroll_Lock
-keycode  79 = KP_7
-keycode  80 = KP_8
-keycode  81 = KP_9
-keycode  82 = KP_Subtract
-keycode  83 = KP_4
-keycode  84 = KP_5
-keycode  85 = KP_6
-keycode  86 = KP_Add
-keycode  87 = KP_1
-keycode  88 = KP_2
-keycode  89 = KP_3
-keycode  90 = KP_0
-keycode  91 = KP_Decimal
-keycode  92 =
-keycode  93 =
-keycode  94 = less greater bar
-keycode  95 = F11
-keycode  96 = F12
-keycode  97 =
-keycode  98 =
-keycode  99 =
-keycode 100 =
-keycode 101 =
-keycode 102 =
-keycode 103 =
-keycode 104 = KP_Enter
-keycode 105 = Control_R
-keycode 106 = KP_Divide
-keycode 107 =
-keycode 108 = Mode_switch
-keycode 109 = Break
-keycode 110 = Home
-keycode 111 = Up
-keycode 112 = Prior
-keycode 113 = Left
-keycode 114 = Right
-keycode 115 = End
-keycode 116 = Down
-keycode 117 = Next
-keycode 118 = Insert
-keycode 119 = Delete
-keycode 120 = Menu
-keycode 121 = F13
-keycode 122 = F14
-keycode 123 = Help
-keycode 124 = Execute
-keycode 125 = F17
-keycode 126 = KP_Subtract
-keycode 127 = Pause
-keycode 128 =
-keycode 129 =
-keycode 130 =
-keycode 131 =
-keycode 132 =
-keycode 133 =
-keycode 134 =
-keycode 135 =
-keycode 136 =
-keycode 137 =
-keycode 138 =
-keycode 139 =
-keycode 140 =
-keycode 141 =
-keycode 142 =
-keycode 143 =
-keycode 144 =
-keycode 145 =
-keycode 146 =
-keycode 147 =
-keycode 148 =
-keycode 149 =
-keycode 150 =
-keycode 151 =
-keycode 152 =
-keycode 153 =
-keycode 154 =
-keycode 155 =
-keycode 156 =
-keycode 157 =
-keycode 158 =
-keycode 159 =
-keycode 160 =
-keycode 161 =
-keycode 162 =
-keycode 163 =
-keycode 164 =
-keycode 165 =
-keycode 166 =
-keycode 167 =
-keycode 168 =
-keycode 169 =
-keycode 170 =
-keycode 171 =
-keycode 172 =
-keycode 173 =
-keycode 174 =
-keycode 175 =
-keycode 176 =
-keycode 177 =
-keycode 178 =
-keycode 179 =
-keycode 180 =
-keycode 181 =
-keycode 182 =
-keycode 183 =
-keycode 184 =
-keycode 185 =
-keycode 186 =
-keycode 187 =
-keycode 188 =
-keycode 189 =
-keycode 190 =
-keycode 191 =
-keycode 192 =
-keycode 193 =
-keycode 194 =
-keycode 195 =
-keycode 196 =
-keycode 197 =
-keycode 198 =
-keycode 199 =
-keycode 200 =
-keycode 201 =
-keycode 202 =
-keycode 203 =
-keycode 204 =
-keycode 205 =
-keycode 206 =
-keycode 207 =
-keycode 208 =
-keycode 209 =
-keycode 210 =
-keycode 211 =
-keycode 212 =
-keycode 213 =
-keycode 214 =
-keycode 215 =
-keycode 216 =
-keycode 217 =
-keycode 218 =
-keycode 219 =
-keycode 220 =
-keycode 221 =
-keycode 222 =
-keycode 223 =
-keycode 224 =
-keycode 225 =
-keycode 226 =
-keycode 227 =
-keycode 228 =
-keycode 229 =
-keycode 230 =
-keycode 231 =
-keycode 232 =
-keycode 233 =
-keycode 234 =
-keycode 235 =
-keycode 236 =
-keycode 237 =
-keycode 238 =
-keycode 239 =
-keycode 240 =
-keycode 241 =
-keycode 242 =
-keycode 243 =
-keycode 244 =
-keycode 245 =
-keycode 246 =
-keycode 247 =
-keycode 248 =
-keycode 249 =
-keycode 250 =
-keycode 251 =
-keycode 252 =
-keycode 253 =
-keycode 254 =
-
-add shift = Shift_L
-add shift = Shift_R
-add shift = Menu
-add lock = Caps_Lock
-add control = Control_L
-add control = Control_R
-add mod1 = Alt_L
-add mod2 = Num_Lock
-!mod3      
-add mod4 = Mode_switch
-!mod5      
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch
deleted file mode 100644
index eff975e..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/gplv2-license.patch
+++ /dev/null
@@ -1,355 +0,0 @@
-COPYING: add GPLv2 license file
-
-this is a local file recipe and the license file is missing.In order
-to pass the license checksum checking, the license file is needed. So
-this patch add the GPLv2 license file.
-
-Upstream-Status: Inappropriate [licensing]
-
-Signed-off-by: Yu Ke <ke.yu@intel.com>
-
-diff --git a/COPYING b/COPYING
-new file mode 100644
-index 0000000..d511905
---- /dev/null
-+++ b/COPYING
-@@ -0,0 +1,339 @@
-+		    GNU GENERAL PUBLIC LICENSE
-+		       Version 2, June 1991
-+
-+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
-+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ Everyone is permitted to copy and distribute verbatim copies
-+ of this license document, but changing it is not allowed.
-+
-+			    Preamble
-+
-+  The licenses for most software are designed to take away your
-+freedom to share and change it.  By contrast, the GNU General Public
-+License is intended to guarantee your freedom to share and change free
-+software--to make sure the software is free for all its users.  This
-+General Public License applies to most of the Free Software
-+Foundation's software and to any other program whose authors commit to
-+using it.  (Some other Free Software Foundation software is covered by
-+the GNU Lesser General Public License instead.)  You can apply it to
-+your programs, too.
-+
-+  When we speak of free software, we are referring to freedom, not
-+price.  Our General Public Licenses are designed to make sure that you
-+have the freedom to distribute copies of free software (and charge for
-+this service if you wish), that you receive source code or can get it
-+if you want it, that you can change the software or use pieces of it
-+in new free programs; and that you know you can do these things.
-+
-+  To protect your rights, we need to make restrictions that forbid
-+anyone to deny you these rights or to ask you to surrender the rights.
-+These restrictions translate to certain responsibilities for you if you
-+distribute copies of the software, or if you modify it.
-+
-+  For example, if you distribute copies of such a program, whether
-+gratis or for a fee, you must give the recipients all the rights that
-+you have.  You must make sure that they, too, receive or can get the
-+source code.  And you must show them these terms so they know their
-+rights.
-+
-+  We protect your rights with two steps: (1) copyright the software, and
-+(2) offer you this license which gives you legal permission to copy,
-+distribute and/or modify the software.
-+
-+  Also, for each author's protection and ours, we want to make certain
-+that everyone understands that there is no warranty for this free
-+software.  If the software is modified by someone else and passed on, we
-+want its recipients to know that what they have is not the original, so
-+that any problems introduced by others will not reflect on the original
-+authors' reputations.
-+
-+  Finally, any free program is threatened constantly by software
-+patents.  We wish to avoid the danger that redistributors of a free
-+program will individually obtain patent licenses, in effect making the
-+program proprietary.  To prevent this, we have made it clear that any
-+patent must be licensed for everyone's free use or not licensed at all.
-+
-+  The precise terms and conditions for copying, distribution and
-+modification follow.
-+
-+		    GNU GENERAL PUBLIC LICENSE
-+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-+
-+  0. This License applies to any program or other work which contains
-+a notice placed by the copyright holder saying it may be distributed
-+under the terms of this General Public License.  The "Program", below,
-+refers to any such program or work, and a "work based on the Program"
-+means either the Program or any derivative work under copyright law:
-+that is to say, a work containing the Program or a portion of it,
-+either verbatim or with modifications and/or translated into another
-+language.  (Hereinafter, translation is included without limitation in
-+the term "modification".)  Each licensee is addressed as "you".
-+
-+Activities other than copying, distribution and modification are not
-+covered by this License; they are outside its scope.  The act of
-+running the Program is not restricted, and the output from the Program
-+is covered only if its contents constitute a work based on the
-+Program (independent of having been made by running the Program).
-+Whether that is true depends on what the Program does.
-+
-+  1. You may copy and distribute verbatim copies of the Program's
-+source code as you receive it, in any medium, provided that you
-+conspicuously and appropriately publish on each copy an appropriate
-+copyright notice and disclaimer of warranty; keep intact all the
-+notices that refer to this License and to the absence of any warranty;
-+and give any other recipients of the Program a copy of this License
-+along with the Program.
-+
-+You may charge a fee for the physical act of transferring a copy, and
-+you may at your option offer warranty protection in exchange for a fee.
-+
-+  2. You may modify your copy or copies of the Program or any portion
-+of it, thus forming a work based on the Program, and copy and
-+distribute such modifications or work under the terms of Section 1
-+above, provided that you also meet all of these conditions:
-+
-+    a) You must cause the modified files to carry prominent notices
-+    stating that you changed the files and the date of any change.
-+
-+    b) You must cause any work that you distribute or publish, that in
-+    whole or in part contains or is derived from the Program or any
-+    part thereof, to be licensed as a whole at no charge to all third
-+    parties under the terms of this License.
-+
-+    c) If the modified program normally reads commands interactively
-+    when run, you must cause it, when started running for such
-+    interactive use in the most ordinary way, to print or display an
-+    announcement including an appropriate copyright notice and a
-+    notice that there is no warranty (or else, saying that you provide
-+    a warranty) and that users may redistribute the program under
-+    these conditions, and telling the user how to view a copy of this
-+    License.  (Exception: if the Program itself is interactive but
-+    does not normally print such an announcement, your work based on
-+    the Program is not required to print an announcement.)
-+
-+These requirements apply to the modified work as a whole.  If
-+identifiable sections of that work are not derived from the Program,
-+and can be reasonably considered independent and separate works in
-+themselves, then this License, and its terms, do not apply to those
-+sections when you distribute them as separate works.  But when you
-+distribute the same sections as part of a whole which is a work based
-+on the Program, the distribution of the whole must be on the terms of
-+this License, whose permissions for other licensees extend to the
-+entire whole, and thus to each and every part regardless of who wrote it.
-+
-+Thus, it is not the intent of this section to claim rights or contest
-+your rights to work written entirely by you; rather, the intent is to
-+exercise the right to control the distribution of derivative or
-+collective works based on the Program.
-+
-+In addition, mere aggregation of another work not based on the Program
-+with the Program (or with a work based on the Program) on a volume of
-+a storage or distribution medium does not bring the other work under
-+the scope of this License.
-+
-+  3. You may copy and distribute the Program (or a work based on it,
-+under Section 2) in object code or executable form under the terms of
-+Sections 1 and 2 above provided that you also do one of the following:
-+
-+    a) Accompany it with the complete corresponding machine-readable
-+    source code, which must be distributed under the terms of Sections
-+    1 and 2 above on a medium customarily used for software interchange; or,
-+
-+    b) Accompany it with a written offer, valid for at least three
-+    years, to give any third party, for a charge no more than your
-+    cost of physically performing source distribution, a complete
-+    machine-readable copy of the corresponding source code, to be
-+    distributed under the terms of Sections 1 and 2 above on a medium
-+    customarily used for software interchange; or,
-+
-+    c) Accompany it with the information you received as to the offer
-+    to distribute corresponding source code.  (This alternative is
-+    allowed only for noncommercial distribution and only if you
-+    received the program in object code or executable form with such
-+    an offer, in accord with Subsection b above.)
-+
-+The source code for a work means the preferred form of the work for
-+making modifications to it.  For an executable work, complete source
-+code means all the source code for all modules it contains, plus any
-+associated interface definition files, plus the scripts used to
-+control compilation and installation of the executable.  However, as a
-+special exception, the source code distributed need not include
-+anything that is normally distributed (in either source or binary
-+form) with the major components (compiler, kernel, and so on) of the
-+operating system on which the executable runs, unless that component
-+itself accompanies the executable.
-+
-+If distribution of executable or object code is made by offering
-+access to copy from a designated place, then offering equivalent
-+access to copy the source code from the same place counts as
-+distribution of the source code, even though third parties are not
-+compelled to copy the source along with the object code.
-+
-+  4. You may not copy, modify, sublicense, or distribute the Program
-+except as expressly provided under this License.  Any attempt
-+otherwise to copy, modify, sublicense or distribute the Program is
-+void, and will automatically terminate your rights under this License.
-+However, parties who have received copies, or rights, from you under
-+this License will not have their licenses terminated so long as such
-+parties remain in full compliance.
-+
-+  5. You are not required to accept this License, since you have not
-+signed it.  However, nothing else grants you permission to modify or
-+distribute the Program or its derivative works.  These actions are
-+prohibited by law if you do not accept this License.  Therefore, by
-+modifying or distributing the Program (or any work based on the
-+Program), you indicate your acceptance of this License to do so, and
-+all its terms and conditions for copying, distributing or modifying
-+the Program or works based on it.
-+
-+  6. Each time you redistribute the Program (or any work based on the
-+Program), the recipient automatically receives a license from the
-+original licensor to copy, distribute or modify the Program subject to
-+these terms and conditions.  You may not impose any further
-+restrictions on the recipients' exercise of the rights granted herein.
-+You are not responsible for enforcing compliance by third parties to
-+this License.
-+
-+  7. If, as a consequence of a court judgment or allegation of patent
-+infringement or for any other reason (not limited to patent issues),
-+conditions are imposed on you (whether by court order, agreement or
-+otherwise) that contradict the conditions of this License, they do not
-+excuse you from the conditions of this License.  If you cannot
-+distribute so as to satisfy simultaneously your obligations under this
-+License and any other pertinent obligations, then as a consequence you
-+may not distribute the Program at all.  For example, if a patent
-+license would not permit royalty-free redistribution of the Program by
-+all those who receive copies directly or indirectly through you, then
-+the only way you could satisfy both it and this License would be to
-+refrain entirely from distribution of the Program.
-+
-+If any portion of this section is held invalid or unenforceable under
-+any particular circumstance, the balance of the section is intended to
-+apply and the section as a whole is intended to apply in other
-+circumstances.
-+
-+It is not the purpose of this section to induce you to infringe any
-+patents or other property right claims or to contest validity of any
-+such claims; this section has the sole purpose of protecting the
-+integrity of the free software distribution system, which is
-+implemented by public license practices.  Many people have made
-+generous contributions to the wide range of software distributed
-+through that system in reliance on consistent application of that
-+system; it is up to the author/donor to decide if he or she is willing
-+to distribute software through any other system and a licensee cannot
-+impose that choice.
-+
-+This section is intended to make thoroughly clear what is believed to
-+be a consequence of the rest of this License.
-+
-+  8. If the distribution and/or use of the Program is restricted in
-+certain countries either by patents or by copyrighted interfaces, the
-+original copyright holder who places the Program under this License
-+may add an explicit geographical distribution limitation excluding
-+those countries, so that distribution is permitted only in or among
-+countries not thus excluded.  In such case, this License incorporates
-+the limitation as if written in the body of this License.
-+
-+  9. The Free Software Foundation may publish revised and/or new versions
-+of the General Public License from time to time.  Such new versions will
-+be similar in spirit to the present version, but may differ in detail to
-+address new problems or concerns.
-+
-+Each version is given a distinguishing version number.  If the Program
-+specifies a version number of this License which applies to it and "any
-+later version", you have the option of following the terms and conditions
-+either of that version or of any later version published by the Free
-+Software Foundation.  If the Program does not specify a version number of
-+this License, you may choose any version ever published by the Free Software
-+Foundation.
-+
-+  10. If you wish to incorporate parts of the Program into other free
-+programs whose distribution conditions are different, write to the author
-+to ask for permission.  For software which is copyrighted by the Free
-+Software Foundation, write to the Free Software Foundation; we sometimes
-+make exceptions for this.  Our decision will be guided by the two goals
-+of preserving the free status of all derivatives of our free software and
-+of promoting the sharing and reuse of software generally.
-+
-+			    NO WARRANTY
-+
-+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-+REPAIR OR CORRECTION.
-+
-+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-+POSSIBILITY OF SUCH DAMAGES.
-+
-+		     END OF TERMS AND CONDITIONS
-+
-+	    How to Apply These Terms to Your New Programs
-+
-+  If you develop a new program, and you want it to be of the greatest
-+possible use to the public, the best way to achieve this is to make it
-+free software which everyone can redistribute and change under these terms.
-+
-+  To do so, attach the following notices to the program.  It is safest
-+to attach them to the start of each source file to most effectively
-+convey the exclusion of warranty; and each file should have at least
-+the "copyright" line and a pointer to where the full notice is found.
-+
-+    <one line to give the program's name and a brief idea of what it does.>
-+    Copyright (C) <year>  <name of author>
-+
-+    This program is free software; you can redistribute it and/or modify
-+    it under the terms of the GNU General Public License as published by
-+    the Free Software Foundation; either version 2 of the License, or
-+    (at your option) any later version.
-+
-+    This program is distributed in the hope that it will be useful,
-+    but WITHOUT ANY WARRANTY; without even the implied warranty of
-+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+    GNU General Public License for more details.
-+
-+    You should have received a copy of the GNU General Public License along
-+    with this program; if not, write to the Free Software Foundation, Inc.,
-+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-+
-+Also add information on how to contact you by electronic and paper mail.
-+
-+If the program is interactive, make it output a short notice like this
-+when it starts in an interactive mode:
-+
-+    Gnomovision version 69, Copyright (C) year name of author
-+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-+    This is free software, and you are welcome to redistribute it
-+    under certain conditions; type `show c' for details.
-+
-+The hypothetical commands `show w' and `show c' should show the appropriate
-+parts of the General Public License.  Of course, the commands you use may
-+be called something other than `show w' and `show c'; they could even be
-+mouse-clicks or menu items--whatever suits your program.
-+
-+You should also get your employer (if you work as a programmer) or your
-+school, if any, to sign a "copyright disclaimer" for the program, if
-+necessary.  Here is a sample; alter the names:
-+
-+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-+
-+  <signature of Ty Coon>, 1 April 1989
-+  Ty Coon, President of Vice
-+
-+This General Public License does not permit incorporating your program into
-+proprietary programs.  If your program is a subroutine library, you may
-+consider it more useful to permit linking proprietary applications with the
-+library.  If this is what you want to do, use the GNU Lesser General
-+Public License instead of this License.
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
deleted file mode 100644
index ab9a939..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "Common X11 scripts and configuration files"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-SECTION = "x11"
-PR = "r47"
-
-inherit distro_features_check
-# rdepends on xdypinfo xmodmap xinit
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI = "file://etc \
-           file://gplv2-license.patch"
-
-S = "${WORKDIR}"
-
-do_install() {
-	cp -R ${S}/etc ${D}${sysconfdir}
-	chmod -R 755 ${D}${sysconfdir}
-}
-
-RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xinput-calibrator formfactor"
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession
rename to import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/13xdgbasedirs.sh
rename to import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/13xdgbasedirs.sh
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/89xdgautostart.sh b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/89xdgautostart.sh
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/89xdgautostart.sh
rename to import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/89xdgautostart.sh
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/90XWindowManager.sh
similarity index 100%
rename from import-layers/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh
rename to import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/X11/Xsession.d/90XWindowManager.sh
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
index 757c23d..4a9670d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in
@@ -2,6 +2,6 @@
 
 XSERVER=/usr/bin/Xorg
 DISPLAY=:0
-ARGS=" -br -pn @BLANK_ARGS@ "
+ARGS=" -br -pn @BLANK_ARGS@ @NO_CURSOR_ARG@ "
 HOME=@HOME@
 USER=@USER@
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
similarity index 81%
rename from import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
index a6d0d5e..345b589 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
@@ -6,6 +6,7 @@
 
 SRC_URI = "file://xserver-nodm \
            file://Xserver \
+           file://X11 \
            file://gplv2-license.patch \
            file://xserver-nodm.service.in \
            file://xserver-nodm.conf.in \
@@ -23,14 +24,19 @@
 PACKAGECONFIG ??= "blank"
 # dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
 PACKAGECONFIG[blank] = ""
+PACKAGECONFIG[nocursor] = ""
 
 do_install() {
     install -d ${D}${sysconfdir}/default
     install xserver-nodm.conf.in ${D}${sysconfdir}/default/xserver-nodm
     install -d ${D}${sysconfdir}/xserver-nodm
     install Xserver ${D}${sysconfdir}/xserver-nodm/Xserver
+    install -d ${D}${sysconfdir}/X11/Xsession.d
+    install X11/Xsession.d/* ${D}${sysconfdir}/X11/Xsession.d/
+    install X11/Xsession ${D}${sysconfdir}/X11/
 
     BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}"
+    NO_CURSOR_ARG="${@bb.utils.contains('PACKAGECONFIG', 'nocursor', '-nocursor', '', d)}"
     if [ "${ROOTLESS_X}" = "1" ] ; then
         XUSER_HOME="/home/xuser"
         XUSER="xuser"
@@ -40,6 +46,7 @@
     fi
     sed -i "s:@HOME@:${XUSER_HOME}:; s:@USER@:${XUSER}:; s:@BLANK_ARGS@:${BLANK_ARGS}:" \
         ${D}${sysconfdir}/default/xserver-nodm
+    sed -i "s:@NO_CURSOR_ARG@:${NO_CURSOR_ARG}:" ${D}${sysconfdir}/default/xserver-nodm
 
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
         install -d ${D}${systemd_unitdir}/system
@@ -59,3 +66,4 @@
 INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
 SYSTEMD_SERVICE_${PN} = "xserver-nodm.service"
 
+RCONFLICTS_${PN} = "xserver-common (< 1.34-r9) x11-common"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
deleted file mode 100644
index 9dc94ae..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1cb83759632bb218559c4d0d65ff79f868c03dc5 Mon Sep 17 00:00:00 2001
-From: "Maxin B. John" <maxin.john@intel.com>
-Date: Tue, 9 Aug 2016 17:03:31 +0300
-Subject: [PATCH] add geometry input when calibrating
-
-Send monitor geometry to xinput_calibrator when running the script
-Update:
-        Remove bashism
-
-Upstream-Status: Inappropriate [no longer maintained]
-
-Signed-off-by: Jonathan David <jonathan.david@ni.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
- scripts/xinput_calibrator_pointercal.sh | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
-index fccb197..fea7c2f 100755
---- a/scripts/xinput_calibrator_pointercal.sh
-+++ b/scripts/xinput_calibrator_pointercal.sh
-@@ -24,7 +24,8 @@ if [ -e $CALFILE ] ; then
-   fi
- fi
- 
--CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep '    xinput set' | sed 's/^    //g; s/$/;/g'`
-+RESOLUTION=$(xrandr | awk -F '[[:space:]+]' '/ connected/ { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
-+CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep '    xinput set' | sed 's/^    //g; s/$/;/g'`
- if [ ! -z "$CALDATA" ] ; then
-   echo $CALDATA > $CALFILE
-   echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
--- 
-2.4.0
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 57c3a7a..68e62ea 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -2,7 +2,7 @@
 HOMEPAGE = "http://www.freedesktop.org/wiki/Software/xinput_calibrator"
 LICENSE = "MIT-X"
 LIC_FILES_CHKSUM = "file://src/calibrator.cpp;endline=22;md5=1bcba08f67cdb56f34021557898e4b5a"
-DEPENDS = "virtual/libx11 libxi"
+DEPENDS = "virtual/libx11 libxi libxrandr"
 
 PV = "0.7.5+git${SRCPV}"
 PR = "r6"
@@ -11,11 +11,10 @@
 # depends on virtual/libx11
 REQUIRED_DISTRO_FEATURES = "x11"
 
-SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
+SRCREV = "03dadf55109bd43d3380f040debe9f82f66f2f35"
 SRC_URI = "git://github.com/tias/xinput_calibrator.git \
            file://30xinput_calibrate.sh \
-           file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \
-           file://add-geometry-input-when-calibrating.patch"
+           file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch"
 
 S = "${WORKDIR}/git"
 
@@ -34,5 +33,5 @@
 }
 
 FILES_${PN} += "${sysconfdir}/xdg/autostart"
-RDEPENDS_${PN} = "xinput formfactor xrandr"
+RDEPENDS_${PN} = "xinput formfactor"
 RRECOMMENDS_${PN} = "pointercal-xinput"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
index 737bc9d..a453e24 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontdir_1.0.7.bb
@@ -11,9 +11,6 @@
 PE = "1"
 PR = "${INC_PR}.0"
 
-DEPENDS = "util-macros-native"
-REQUIRED_DISTRO_FEATURES_class-native = ""
-
 RDEPENDS_${PN} += "mkfontscale"
 RDEPENDS_${PN}_class-native += "mkfontscale-native"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
index d1aa9b3..31cf186 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/mkfontscale_1.1.2.bb
@@ -10,8 +10,6 @@
 
 DEPENDS = "util-macros-native zlib libfontenc freetype xproto"
 
-REQUIRED_DISTRO_FEATURES_class-native = ""
-
 BBCLASSEXTEND = "native"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=2e0d129d05305176d1a790e0ac1acb7f"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.10.bb
similarity index 61%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.10.bb
index 59b3323..0e90ffd 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xauth_1.0.10.bb
@@ -8,8 +8,8 @@
 DEPENDS += "libxau libxext libxmu"
 PE = "1"
 
-SRC_URI[md5sum] = "7d6003f32838d5b688e2c8a131083271"
-SRC_URI[sha256sum] = "56ce1523eb48b1f8a4f4244fe1c3d8e6af1a3b7d4b0e6063582421b0b68dc28f"
+SRC_URI[md5sum] = "f3f76cb10f69b571c43893ea6a634aa4"
+SRC_URI[sha256sum] = "5afe42ce3cdf4f60520d1658d2b17face45c74050f39af45dccdc95e73fafc4d"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
index f23d258..77490f5 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-app/xhost_1.0.7.bb
@@ -16,5 +16,5 @@
 SRC_URI[md5sum] = "f5d490738b148cb7f2fe760f40f92516"
 SRC_URI[sha256sum] = "93e619ee15471f576cfb30c663e18f5bc70aca577a63d2c2c03f006a7837c29a"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.5.bb
similarity index 83%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.5.bb
index f81c3ec..96b220c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.5.bb
@@ -16,5 +16,6 @@
 
 DEPENDS += "mtdev libevdev"
 
-SRC_URI[md5sum] = "aa3363ce5061d0c4d1e7f7019b99716d"
-SRC_URI[sha256sum] = "5aa21ba4be8df927e5676a99c7f4f0343abc089f5451b7e73e39536f29b332a2"
+SRC_URI[md5sum] = "94c2c8354c74ab1cfbbb0a222078b9c6"
+SRC_URI[sha256sum] = "9edaa6205baf6d2922cc4db3d8e54a7e7773b5f733b0ae90f6be7725f983b70d"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.9.0.bb
similarity index 73%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.9.0.bb
index 6fe51ac..1896fff 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.8.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_1.9.0.bb
@@ -9,5 +9,5 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=ea2099d24ac9e316a6d4b9f20b3d4e10"
 
-SRC_URI[md5sum] = "96ccc43d389b970afbd3893875dfd678"
-SRC_URI[sha256sum] = "1ac8ff39bf9da7d2fc7fd6c24515726e8138340c0518ab8c606e008cf93ca211"
+SRC_URI[md5sum] = "a3a3f0dd32361dcdbd406e894dafe090"
+SRC_URI[sha256sum] = "f7c900f21752683402992b288d5a2826de7a6c0c0abac2aadd7e8a409e170388"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb
deleted file mode 100644
index dfb08f7..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-keyboard_git.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- keyboard input driver"
-
-DESCRIPTION = "keyboard is an Xorg input driver for keyboards. The \
-driver supports the standard OS-provided keyboard interface.  The driver \
-functions as a keyboard input device, and may be used as the X server's \
-core keyboard."
-
-SRCREV = "3e28d68b50d291938734e9684b8296ca864f3892"
-PV = "1.3.2+git${SRCPV}"
-PR = "${INC_PR}.0"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-keyboard"
-S = "${WORKDIR}/git"
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.24.0.bb
similarity index 63%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.24.0.bb
index 5e5c471..14b1271 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.19.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.24.0.bb
@@ -5,7 +5,7 @@
 
 DEPENDS += "libinput"
 
-SRC_URI[md5sum] = "52c38b1369764243bfcf6ead1e4c6d32"
-SRC_URI[sha256sum] = "6c5d30dc7c8b8ae34261340e1dc9cbb8ef435078e084b8ef507527a8a21af477"
+SRC_URI[md5sum] = "bd3fa118e4abadb8804dc6a099bb4ab3"
+SRC_URI[sha256sum] = "ddcb07350aed59b2996a92a1b4ff64d1c0b0c86a3f0ddca15b2b1c8c8bb13628"
 
 FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch
deleted file mode 100644
index 6930864..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse/unbreak.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Unbreak the linux mouse driver by using config.h
-
-RP - 4/11/07
-
-Upstream-Status: Pending
-
-Index: git/src/lnx_mouse.c
-===================================================================
---- git.orig/src/lnx_mouse.c	2008-11-04 23:46:05.000000000 +0000
-+++ git/src/lnx_mouse.c	2008-11-04 23:46:15.000000000 +0000
-@@ -3,8 +3,8 @@
-  * Copyright 1999 by The XFree86 Project, Inc.
-  */
- 
--#ifdef HAVE_XORG_CONFIG_H
--#include <xorg-config.h>
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
- #endif
- 
- #include <X11/X.h>
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.2.bb
similarity index 75%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.2.bb
index 1f0b78a..0750476 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_1.9.2.bb
@@ -10,6 +10,5 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=90ea9f90d72b6d9327dede5ffdb2a510"
 
-SRC_URI[md5sum] = "77085b649c5c0b333565ba562f573951"
-SRC_URI[sha256sum] = "3485d375779c08406f0789feedde15933dc703158a086ddac638598f479fc5ce"
-
+SRC_URI[md5sum] = "ce2d679283a22c8e0dccdd9248594845"
+SRC_URI[sha256sum] = "f425d5b05c6ab412a27e0a1106bb83f9e2662b307210abbe48270892387f4b2f"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb
deleted file mode 100644
index d79a2e4..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-mouse_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- mouse input driver"
-
-DESCRIPTION = "mouse is an Xorg input driver for mice. The driver \
-supports most available mouse types and interfaces.  The mouse driver \
-functions as a pointer input device, and may be used as the X server's \
-core pointer. Multiple mice are supported by multiple instances of this \
-driver."
-
-SRCREV = "ea5cfe804e112f320f14ad896c7802d53551d3e6"
-PV = "1.3.0+git${SRCPV}"
-PR = "${INC_PR}.0"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-mouse \
-           file://unbreak.patch"
-S = "${WORKDIR}/git"
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.0.bb
similarity index 79%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.0.bb
index b47c82c..d327a3b 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.9.0.bb
@@ -10,7 +10,7 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
 
-SRC_URI[md5sum] = "4e3c8bed1ab4a67db2160c2c3d7e2a34"
-SRC_URI[sha256sum] = "d39f100c74f3673778b53f17bab7690161925e25dd998a15dd8cc69b52e83f01"
+SRC_URI[md5sum] = "58e5b7722a402114093bf193962d1e3a"
+SRC_URI[sha256sum] = "afba3289d7a40217a19d90db98ce181772f9ca6d77e1898727b0afcf02073b5a"
 
 DEPENDS += "libxi mtdev libxtst libevdev"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb
deleted file mode 100644
index 140f633..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_git.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- synaptics touchpad input driver"
-
-DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
-Synaptics Incorporated. Even though these touchpads (by default, \
-operating in a compatibility mode emulating a standard mouse) can be \
-handled by the normal evdev or mouse drivers, this driver allows more \
-advanced features of the touchpad to become available."
-
-SRCREV = "934bc0012f948c52aadc8eda912f7728fb7394a2"
-PV = "0.15.2+git${SRCPV}"
-PR = "${INC_PR}.1"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xorg/driver/xf86-input-synaptics"
-S = "${WORKDIR}/git"
-
-DEPENDS += "libxi mtdev libxtst"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
index 06cc730..f86de6f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_git.bb
@@ -9,7 +9,7 @@
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
 
-SRCREV = "8f33f80100096f7790c7b819ce37a3ed8ce8b5fa"
+SRCREV = "e4fe79cf0d9a05ee3f3a027148ef0aeb2b1b34e1"
 PV = "2.99.917+git${SRCPV}"
 S = "${WORKDIR}/git"
 
@@ -20,6 +20,7 @@
 
 SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
 SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
 
 DEPENDS += "virtual/libx11 drm libpciaccess pixman"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
similarity index 89%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
index 7895449..e652394 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.5.bb
@@ -24,8 +24,8 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
 DEPENDS += "virtual/libx11 libdrm xf86driproto"
 
-SRC_URI[md5sum] = "a364e151a537948f75bb8c9b840a31da"
-SRC_URI[sha256sum] = "a7192690b8638f5c8d611a1bae07cc13081e22edd4070f37a2f5c3f8d79e7ebc"
+SRC_URI[md5sum] = "3b8ea5e8fba63355c0dc6681c49d5fe5"
+SRC_URI[sha256sum] = "93e7d42107521e61f61980eaea64fb452e87b7b94272e48938ac8d904ccfab5a"
 
 CFLAGS += " -I${STAGING_INCDIR}/xorg "
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
index 6039d08..5bda720 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware/0002-add-option-for-vmwgfx.patch
@@ -1,17 +1,18 @@
+From da6612659a279bcb02f70622b53a3894fbc11052 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 9 Dec 2016 14:35:45 +0200
+Subject: [PATCH] Add option for vmwgfx
+
 Upstream-Status:Submitted
+
 Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From f103d6f570671c649ccd7b225e6d6c9f14371888 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Wed, 25 Jun 2014 16:16:44 +0100
-Subject: [PATCH 2/2] add option for vmwgfx
-
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
 ---
- configure.ac |   49 ++++++++++++++++++++-----------------------------
- 1 file changed, 20 insertions(+), 29 deletions(-)
+ configure.ac | 51 +++++++++++++++++++++------------------------------
+ 1 file changed, 21 insertions(+), 30 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index be40ed7..8e15307 100644
+index 9f259ce..f3fec57 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -64,6 +64,13 @@ AC_ARG_ENABLE(vmwarectrl-client,
@@ -40,7 +41,7 @@
  PKG_CHECK_EXISTS([xorg-server >= 1.12.0],
                   [AC_DEFINE([HAVE_XORG_SERVER_1_12_0], 1,
                   [Has version 1.12.0 or greater of the Xserver])])
-@@ -114,39 +116,28 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+@@ -114,34 +116,22 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
  
  AC_SUBST([moduledir])
  
@@ -62,6 +63,7 @@
 -#
 +AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
 +if test x$VMWGFX = xyes; then
++	AC_MSG_RESULT([yes])
 +	PKG_CHECK_MODULES([LIBDRM], [libdrm])
 +	# Check for prime.
  	PKG_CHECK_EXISTS([libdrm >= 2.4.38],
@@ -75,15 +77,18 @@
 -AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
 -if test x$BUILD_VMWGFX = xyes; then
 -	AC_MSG_RESULT([yes])
+-        AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
 +	# Early versions of mesa 10 forgot to bump the XA major version number
 +	# in the xa_tracker.h header
 +	PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0],
 +			  [PKG_CHECK_EXISTS([xatracker = 2.0.0],
-+	                  [AC_DEFINE([HAVE_XA_2], 1,
-+               		  [Has version 2 of XA])])])
-         AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
-+	AC_MSG_RESULT([yes])
- else
++			  [AC_DEFINE([HAVE_XA_2], 1,
++				     [Has version 2 of XA])])])
++	AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
+ 	libudev_check=yes
+ 	AC_ARG_WITH([libudev],
+ 		[AS_HELP_STRING([--without-libudev],
+@@ -158,7 +148,8 @@ else
  	AC_MSG_RESULT([no])
  fi
  
@@ -94,5 +99,5 @@
  AC_CONFIG_FILES([
                  Makefile
 -- 
-1.7.10.4
+2.1.4
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.2.1.bb
similarity index 78%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.2.1.bb
index 8c891e6..706d35d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.2.1.bb
@@ -10,8 +10,8 @@
 
 SRC_URI += "file://0002-add-option-for-vmwgfx.patch"
 
-SRC_URI[md5sum] = "0cba22fed4cb639d5c4276f7892c543d"
-SRC_URI[sha256sum] = "3c1d244e4b1b77e92126957965cdc9fb82de4c215c0706a3a8aaff6939e4a0cc"
+SRC_URI[md5sum] = "4c3912e4d8947f6c2fc1ee9e2f211d74"
+SRC_URI[sha256sum] = "e2f7f7101fba7f53b268e7a25908babbf155b3984fb5268b3d244eb6c11bf62b"
 
 COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
index 57a4c82..fe42f11 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -33,8 +33,8 @@
     }
 
     output = os.popen("pkg-config xorg-server --variable=%s" % abis[name]).read()
-    mlprefix = d.getVar('MLPREFIX', True) or ''
+    mlprefix = d.getVar('MLPREFIX') or ''
     abi = "%sxorg-abi-%s-%s" % (mlprefix, name, output.split(".")[0])
 
-    pn = d.getVar("PN", True)
+    pn = d.getVar("PN")
     d.appendVar('RDEPENDS_' + pn, ' ' + abi)
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
index c4dba1b..342067d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
@@ -1,4 +1,4 @@
-include xorg-driver-common.inc
+require xorg-driver-common.inc
 
 DEPENDS += "inputproto kbproto "
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
index 38281e0..b5862da 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-video.inc
@@ -1,4 +1,4 @@
-include xorg-driver-common.inc
+require xorg-driver-common.inc
 
 DEPENDS =+ "renderproto videoproto xextproto fontsproto"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc
index da20ab9..cdbebcf 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-font/xorg-font-common.inc
@@ -4,7 +4,7 @@
 SECTION = "x11/fonts"
 LICENSE = "MIT-X"
 
-DEPENDS = " encodings font-alias font-util-native mkfontdir-native mkfontscale-native"
+DEPENDS = " encodings font-alias font-util-native"
 RDEPENDS_${PN} = "encodings font-util font-alias"
 
 XORG_PN = "${BPN}"
@@ -18,7 +18,6 @@
 
 # The mkfontscale-native requires x11 in DISTRO_FEATURES
 REQUIRED_DISTRO_FEATURES = "x11"
-REQUIRED_DISTRO_FEATURES_class-native = ""
 
 EXTRA_OEMAKE += "FCCACHE=/bin/true UTIL_DIR=${STAGING_DIR_TARGET}\$\(MAPFILES_PATH\)"
 
@@ -31,6 +30,7 @@
 
 FILES_${PN} += " ${libdir}/X11/fonts ${datadir}"
 
+PACKAGE_WRITE_DEPS += "mkfontdir-native mkfontscale-native"
 pkg_postinst_${PN} () {
         for fontdir in `find $D/usr/lib/X11/fonts -type d`; do
                 mkfontdir $fontdir
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
index b361ad6..f069749 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libice_1.0.9.bb
@@ -23,6 +23,6 @@
 SRC_URI[md5sum] = "addfb1e897ca8079531669c7c7711726"
 SRC_URI[sha256sum] = "8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[arc4] = "ac_cv_lib_bsd_arc4random_buf=yes,ac_cv_lib_bsd_arc4random_buf=no,libbsd"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
index da4ed92..48922cb 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libsm_1.2.2.bb
@@ -27,5 +27,5 @@
 SRC_URI[md5sum] = "499a7773c65aba513609fe651853c5f3"
 SRC_URI[sha256sum] = "0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.4.bb
similarity index 72%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.3.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.4.bb
index c0d0148..0c761d7 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11-diet_1.6.4.bb
@@ -11,8 +11,8 @@
 RPROVIDES_${PN}-dev = "libx11-dev"
 RPROVIDES_${PN}-locale = "libx11-locale"
 
-SRC_URI[md5sum] = "2e36b73f8a42143142dda8129f02e4e0"
-SRC_URI[sha256sum] = "cf31a7c39f2f52e8ebd0db95640384e63451f9b014eed2bb7f5de03e8adc8111"
+SRC_URI[md5sum] = "6d54227082f3aa2c596f0b3a3fbb9175"
+SRC_URI[sha256sum] = "b7c748be3aa16ec2cbd81edc847e9b6ee03f88143ab270fb59f58a044d34e441"
 
 EXTRA_OECONF += "--disable-xlocale"
 
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch
deleted file mode 100644
index f5b4d69..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 8ea762f94f4c942d898fdeb590a1630c83235c17 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Sun, 25 Sep 2016 21:25:25 +0200
-Subject: Validation of server responses in XGetImage()
-
-Check if enough bytes were received for specified image type and
-geometry. Otherwise GetPixel and other functions could trigger an
-out of boundary read later on.
-
-CVE: CVE-2016-7942
-Upstream-Status: Backport
-
-Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
-
-diff --git a/src/GetImage.c b/src/GetImage.c
-index c461abc..ff32d58 100644
---- a/src/GetImage.c
-+++ b/src/GetImage.c
-@@ -59,6 +59,7 @@ XImage *XGetImage (
- 	char *data;
- 	unsigned long nbytes;
- 	XImage *image;
-+	int planes;
- 	LockDisplay(dpy);
- 	GetReq (GetImage, req);
- 	/*
-@@ -91,18 +92,28 @@ XImage *XGetImage (
- 	    return (XImage *) NULL;
- 	}
-         _XReadPad (dpy, data, nbytes);
--        if (format == XYPixmap)
--	   image = XCreateImage(dpy, _XVIDtoVisual(dpy, rep.visual),
--		  Ones (plane_mask &
--			(((unsigned long)0xFFFFFFFF) >> (32 - rep.depth))),
--		  format, 0, data, width, height, dpy->bitmap_pad, 0);
--	else /* format == ZPixmap */
--           image = XCreateImage (dpy, _XVIDtoVisual(dpy, rep.visual),
--		 rep.depth, ZPixmap, 0, data, width, height,
--		  _XGetScanlinePad(dpy, (int) rep.depth), 0);
-+        if (format == XYPixmap) {
-+	    image = XCreateImage(dpy, _XVIDtoVisual(dpy, rep.visual),
-+		Ones (plane_mask &
-+		    (((unsigned long)0xFFFFFFFF) >> (32 - rep.depth))),
-+		format, 0, data, width, height, dpy->bitmap_pad, 0);
-+	    planes = image->depth;
-+	} else { /* format == ZPixmap */
-+            image = XCreateImage (dpy, _XVIDtoVisual(dpy, rep.visual),
-+		rep.depth, ZPixmap, 0, data, width, height,
-+		    _XGetScanlinePad(dpy, (int) rep.depth), 0);
-+	    planes = 1;
-+	}
- 
- 	if (!image)
- 	    Xfree(data);
-+	if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 ||
-+	    INT_MAX / image->height <= image->bytes_per_line ||
-+	    INT_MAX / planes <= image->height * image->bytes_per_line ||
-+	    nbytes < planes * image->height * image->bytes_per_line) {
-+	    XDestroyImage(image);
-+	    image = NULL;
-+	}
- 	UnlockDisplay(dpy);
- 	SyncHandle();
- 	return (image);
--- 
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch
deleted file mode 100644
index 5002423..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 8c29f1607a31dac0911e45a0dd3d74173822b3c9 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Sun, 25 Sep 2016 21:22:57 +0200
-Subject: The validation of server responses avoids out of boundary accesses.
-
-v2: FontNames.c  return a NULL list whenever a single
-length field from the server is incohent.
-
-CVE: CVE-2016-7943
-Upstream-Status: Backport
-
-Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
-
-diff --git a/src/FontNames.c b/src/FontNames.c
-index 21dcafe..e55f338 100644
---- a/src/FontNames.c
-+++ b/src/FontNames.c
-@@ -66,7 +66,7 @@ int *actualCount)	/* RETURN */
- 
-     if (rep.nFonts) {
- 	flist = Xmalloc (rep.nFonts * sizeof(char *));
--	if (rep.length < (INT_MAX >> 2)) {
-+	if (rep.length > 0 && rep.length < (INT_MAX >> 2)) {
- 	    rlen = rep.length << 2;
- 	    ch = Xmalloc(rlen + 1);
- 	    /* +1 to leave room for last null-terminator */
-@@ -93,11 +93,22 @@ int *actualCount)	/* RETURN */
- 	    if (ch + length < chend) {
- 		flist[i] = ch + 1;  /* skip over length */
- 		ch += length + 1;  /* find next length ... */
--		length = *(unsigned char *)ch;
--		*ch = '\0';  /* and replace with null-termination */
--		count++;
--	    } else
--		flist[i] = NULL;
-+		if (ch <= chend) {
-+		    length = *(unsigned char *)ch;
-+		    *ch = '\0';  /* and replace with null-termination */
-+		    count++;
-+		} else {
-+                    Xfree(flist);
-+                    flist = NULL;
-+                    count = 0;
-+                    break;
-+		}
-+	    } else {
-+                Xfree(flist);
-+                flist = NULL;
-+                count = 0;
-+                break;
-+            }
- 	}
-     }
-     *actualCount = count;
-diff --git a/src/ListExt.c b/src/ListExt.c
-index be6b989..0516e45 100644
---- a/src/ListExt.c
-+++ b/src/ListExt.c
-@@ -55,7 +55,7 @@ char **XListExtensions(
- 
- 	if (rep.nExtensions) {
- 	    list = Xmalloc (rep.nExtensions * sizeof (char *));
--	    if (rep.length < (INT_MAX >> 2)) {
-+	    if (rep.length > 0 && rep.length < (INT_MAX >> 2)) {
- 		rlen = rep.length << 2;
- 		ch = Xmalloc (rlen + 1);
-                 /* +1 to leave room for last null-terminator */
-@@ -80,9 +80,13 @@ char **XListExtensions(
- 		if (ch + length < chend) {
- 		    list[i] = ch+1;  /* skip over length */
- 		    ch += length + 1; /* find next length ... */
--		    length = *ch;
--		    *ch = '\0'; /* and replace with null-termination */
--		    count++;
-+		    if (ch <= chend) {
-+			length = *ch;
-+			*ch = '\0'; /* and replace with null-termination */
-+			count++;
-+		    } else {
-+			list[i] = NULL;
-+		    }
- 		} else
- 		    list[i] = NULL;
- 	    }
-diff --git a/src/ModMap.c b/src/ModMap.c
-index a809aa2..49a5d08 100644
---- a/src/ModMap.c
-+++ b/src/ModMap.c
-@@ -42,7 +42,8 @@ XGetModifierMapping(register Display *dpy)
-     GetEmptyReq(GetModifierMapping, req);
-     (void) _XReply (dpy, (xReply *)&rep, 0, xFalse);
- 
--    if (rep.length < (INT_MAX >> 2)) {
-+    if (rep.length < (INT_MAX >> 2) &&
-+	(rep.length >> 1) == rep.numKeyPerModifier) {
- 	nbytes = (unsigned long)rep.length << 2;
- 	res = Xmalloc(sizeof (XModifierKeymap));
- 	if (res)
--- 
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch
deleted file mode 100644
index f2abf7c..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11/libX11-Add-missing-NULL-check.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 4d85d5f3bd8afac893738fd88e19d8cb5cf998ff Mon Sep 17 00:00:00 2001
-From: Drew Moseley <drew_moseley@mentor.com>
-Date: Sun, 27 Jul 2014 13:10:07 -0400
-Subject: [PATCH] libX11: Add missing NULL check on im and im->methods
-
-Upstream-Status: Backport (c827edcd1c4a7f920aa25208083b5b58d60d2b44)
-Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
-
----
- src/xlibi18n/ICWrap.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff -ru libX11-1.6.2-orig/src/xlibi18n/ICWrap.c libX11-1.6.2/src/xlibi18n/ICWrap.c
---- libX11-1.6.2-orig/src/xlibi18n/ICWrap.c	2014-07-27 13:38:29.586666449 -0400
-+++ libX11-1.6.2/src/xlibi18n/ICWrap.c	2014-07-27 13:41:39.671609030 -0400
-@@ -169,7 +169,7 @@
-     va_list var;
-     int     total_count;
-     XIMArg *args;
--    char   *ret;
-+    char   *ret = NULL;
- 
-     /*
-      * so count the stuff dangling here
-@@ -185,7 +185,8 @@
-     _XIMVaToNestedList(var, total_count, &args);
-     va_end(var);
- 
--    ret = (*im->methods->set_values) (im, args);
-+    if (im && im->methods)
-+	ret = (*im->methods->set_values) (im, args);
-     Xfree(args);
-     return ret;
- }
-@@ -196,7 +197,7 @@
-     va_list var;
-     int     total_count;
-     XIMArg *args;
--    char   *ret;
-+    char   *ret = NULL;
- 
-     /*
-      * so count the stuff dangling here
-@@ -212,7 +213,8 @@
-     _XIMVaToNestedList(var, total_count, &args);
-     va_end(var);
- 
--    ret = (*im->methods->get_values) (im, args);
-+    if (im && im->methods)
-+	ret = (*im->methods->get_values) (im, args);
-     Xfree(args);
-     return ret;
- }
-@@ -228,7 +230,7 @@
-     va_list var;
-     int     total_count;
-     XIMArg *args;
--    XIC     ic;
-+    XIC     ic = NULL;
- 
-     /*
-      * so count the stuff dangling here
-@@ -244,7 +246,8 @@
-     _XIMVaToNestedList(var, total_count, &args);
-     va_end(var);
- 
--    ic = (XIC) (*im->methods->create_ic) (im, args);
-+    if (im && im->methods)
-+	ic = (XIC) (*im->methods->create_ic) (im, args);
-     Xfree(args);
-     if (ic) {
- 	ic->core.next = im->core.ic_chain;
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
deleted file mode 100644
index 23a7789..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require libx11.inc
-inherit gettext
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI += "file://disable_tests.patch \
-            file://libX11-Add-missing-NULL-check.patch \
-            file://CVE-2016-7942.patch \
-            file://CVE-2016-7943.patch \
-           "
-
-SRC_URI[md5sum] = "2e36b73f8a42143142dda8129f02e4e0"
-SRC_URI[sha256sum] = "cf31a7c39f2f52e8ebd0db95640384e63451f9b014eed2bb7f5de03e8adc8111"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb
new file mode 100644
index 0000000..caa95fb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libx11_1.6.4.bb
@@ -0,0 +1,10 @@
+require libx11.inc
+inherit gettext
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI += "file://disable_tests.patch \
+           "
+
+SRC_URI[md5sum] = "6d54227082f3aa2c596f0b3a3fbb9175"
+SRC_URI[sha256sum] = "b7c748be3aa16ec2cbd81edc847e9b6ee03f88143ab270fb59f58a044d34e441"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.3.bb
similarity index 79%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.3.bb
index f078aed..c80042d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfixes_5.0.3.bb
@@ -18,5 +18,6 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[md5sum] = "544d73df94e638ba7b64147be416e576"
-SRC_URI[sha256sum] = "9bd20edfec084a1bed481d48dd4815dee88139fffad091418cdda081129a9aea"
+SRC_URI[md5sum] = "07e01e046a0215574f36a3aacb148be0"
+SRC_URI[sha256sum] = "de1cd33aff226e08cefd0e6759341c2c8e8c9faf8ce9ac6ec38d43e287b22ad6"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.1.bb
new file mode 100644
index 0000000..4bfb290
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont2_2.0.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "XFont2: X Font rasterisation library"
+
+DESCRIPTION = "libXfont2 provides various services for X servers, most \
+notably font selection and rasterisation (through external libraries \
+such as freetype)."
+
+require xorg-lib-common.inc
+
+LICENSE = "MIT & MIT-style & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a46c8040f2f737bcd0c435feb2ab1c2c"
+
+DEPENDS += "freetype xtrans fontsproto libfontenc zlib"
+
+XORG_PN = "libXfont2"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "0d9f6dd9c23bf4bcbfb00504b566baf5"
+SRC_URI[sha256sum] = "e9fbbb475ddd171b3a6a54b989cbade1f6f874fc35d505ebc5be426bc6e4db7e"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb
similarity index 70%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb
index e01f331..b11dda5 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxfont_1.5.2.bb
@@ -18,8 +18,8 @@
 
 BBCLASSEXTEND = "native"
 
-SRC_URI[md5sum] = "96f76ba94b4c909230bac1e2dcd551c4"
-SRC_URI[sha256sum] = "b70898527c73f9758f551bbab612af611b8a0962202829568d94f3edf4d86098"
+SRC_URI[md5sum] = "254ee42bd178d18ebc7a73aacfde7f79"
+SRC_URI[sha256sum] = "02945ea68da447102f3e6c2b896c1d2061fd115de99404facc2aca3ad7010d71"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
index a967cdc..b454781 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxft_2.3.2.bb
@@ -28,6 +28,6 @@
 BBCLASSEXTEND = "native"
 
 python () {
-        if d.getVar('DEBIAN_NAMES', True):
+        if d.getVar('DEBIAN_NAMES'):
             d.setVar('PKG_${PN}', '${MLPREFIX}libxft2')
 }
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb
similarity index 80%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb
index 7523479..74f0527 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.9.bb
@@ -17,5 +17,6 @@
 
 XORG_PN = "libXi"
 
-SRC_URI[md5sum] = "510e555ecfffa8d2298a0f42b725e563"
-SRC_URI[sha256sum] = "1f32a552cec0f056c0260bdb32e853cec0673d2f40646ce932ad5a9f0205b7ac"
+SRC_URI[md5sum] = "1f0f2719c020655a60aee334ddd26d67"
+SRC_URI[sha256sum] = "c2e6b8ff84f9448386c1b5510a5cf5a16d788f76db018194dacdc200180faf45"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb
similarity index 65%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb
index fc08109..81df1dd 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.6.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.7.1.bb
@@ -2,15 +2,15 @@
 DESCRIPTION = "libxkbcommon is a keymap compiler and support library which \
 processes a reduced subset of keymaps as defined by the XKB specification."
 HOMEPAGE = "http://www.xkbcommon.org"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=09457b156e3155972abebcaaaa0cb434"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e525ed9809e1f8a07cf4bce8b09e8b87"
 LICENSE = "MIT & MIT-style"
 
 DEPENDS = "util-macros flex-native bison-native"
 
 SRC_URI = "http://xkbcommon.org/download/${BPN}-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "67a8f322b5fa32352272e811bb90dd73"
-SRC_URI[sha256sum] = "5b0887b080b42169096a61106661f8d35bae783f8b6c58f97ebcd3af83ea8760"
+SRC_URI[md5sum] = "947ba609cb0239b9462127d5cf8908ee"
+SRC_URI[sha256sum] = "ba59305d2e19e47c27ea065c2e0df96ebac6a3c6e97e28ae5620073b6084e68b"
 
 UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
 
@@ -18,5 +18,5 @@
 
 EXTRA_OECONF = "--disable-docs"
 
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxcb xkeyboard-config,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
index d5935ff..4740c15 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxmu_1.1.2.bb
@@ -31,5 +31,5 @@
 SRC_URI[md5sum] = "41d92ab627dfa06568076043f3e089e4"
 SRC_URI[sha256sum] = "756edc7c383254eef8b4e1b733c3bf1dc061b523c9f9833ac7058378b8349d0b"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
 PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxpm_3.5.11.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb
similarity index 81%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxpm_3.5.11.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb
index 545874c..13a1b91 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxpm_3.5.11.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxpm_3.5.12.bb
@@ -21,7 +21,7 @@
 FILES_cxpm = "${bindir}/cxpm"
 FILES_sxpm = "${bindir}/sxpm"
 
-SRC_URI[md5sum] = "769ee12a43611cdebd38094eaf83f3f0"
-SRC_URI[sha256sum] = "c5bdafa51d1ae30086fac01ab83be8d47fe117b238d3437f8e965434090e041c"
+SRC_URI[md5sum] = "20f4627672edb2bd06a749f11aa97302"
+SRC_URI[sha256sum] = "fd6a6de3da48de8d1bb738ab6be4ad67f7cb0986c39bd3f7d51dd24f7854bdec"
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr/CVE-2016-7947_CVE-2016-7948.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr/CVE-2016-7947_CVE-2016-7948.patch
deleted file mode 100644
index a9b3dbc..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr/CVE-2016-7947_CVE-2016-7948.patch
+++ /dev/null
@@ -1,439 +0,0 @@
-From a0df3e1c7728205e5c7650b2e6dce684139254a6 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Sun, 25 Sep 2016 22:21:40 +0200
-Subject: Avoid out of boundary accesses on illegal responses
-
-The responses of the connected X server have to be properly checked
-to avoid out of boundary accesses that could otherwise be triggered
-by a malicious server.
-
-CVE: CVE-2016-7947
-libXrandr: Insufficient validation of server responses result in Integer overflows
-
-CVE: CVE-2016-7948
-libXrandr: Insufficient validation of server responses result in various data mishandlings
-
-Upstream-Status: Backport
-
-Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
-
-diff --git a/src/XrrConfig.c b/src/XrrConfig.c
-index 2f0282b..e68c45a 100644
---- a/src/XrrConfig.c
-+++ b/src/XrrConfig.c
-@@ -29,6 +29,7 @@
- #include <config.h>
- #endif
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <X11/Xlib.h>
- /* we need to be able to manipulate the Display structure on events */
-@@ -272,23 +273,30 @@ static XRRScreenConfiguration *_XRRGetScreenInfo (Display *dpy,
- 	rep.rate = 0;
- 	rep.nrateEnts = 0;
-     }
-+    if (rep.length < INT_MAX >> 2) {
-+	nbytes = (long) rep.length << 2;
- 
--    nbytes = (long) rep.length << 2;
-+	nbytesRead = (long) (rep.nSizes * SIZEOF (xScreenSizes) +
-+			    ((rep.nrateEnts + 1)& ~1) * 2 /* SIZEOF(CARD16) */);
- 
--    nbytesRead = (long) (rep.nSizes * SIZEOF (xScreenSizes) +
--			 ((rep.nrateEnts + 1)& ~1) * 2 /* SIZEOF (CARD16) */);
-+	/*
-+	 * first we must compute how much space to allocate for
-+	 * randr library's use; we'll allocate the structures in a single
-+	 * allocation, on cleanlyness grounds.
-+	 */
- 
--    /*
--     * first we must compute how much space to allocate for
--     * randr library's use; we'll allocate the structures in a single
--     * allocation, on cleanlyness grounds.
--     */
-+	rbytes = sizeof (XRRScreenConfiguration) +
-+	  (rep.nSizes * sizeof (XRRScreenSize) +
-+	   rep.nrateEnts * sizeof (int));
- 
--    rbytes = sizeof (XRRScreenConfiguration) +
--      (rep.nSizes * sizeof (XRRScreenSize) +
--       rep.nrateEnts * sizeof (int));
-+	scp = (struct _XRRScreenConfiguration *) Xmalloc(rbytes);
-+    } else {
-+	nbytes = 0;
-+	nbytesRead = 0;
-+	rbytes = 0;
-+	scp = NULL;
-+    }
- 
--    scp = (struct _XRRScreenConfiguration *) Xmalloc(rbytes);
-     if (scp == NULL) {
- 	_XEatData (dpy, (unsigned long) nbytes);
- 	return NULL;
-diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
-index 5ae35c5..6665092 100644
---- a/src/XrrCrtc.c
-+++ b/src/XrrCrtc.c
-@@ -24,6 +24,7 @@
- #include <config.h>
- #endif
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <X11/Xlib.h>
- /* we need to be able to manipulate the Display structure on events */
-@@ -57,22 +58,33 @@ XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc)
- 	return NULL;
-     }
- 
--    nbytes = (long) rep.length << 2;
-+    if (rep.length < INT_MAX >> 2)
-+    {
-+	nbytes = (long) rep.length << 2;
- 
--    nbytesRead = (long) (rep.nOutput * 4 +
--			 rep.nPossibleOutput * 4);
-+	nbytesRead = (long) (rep.nOutput * 4 +
-+			     rep.nPossibleOutput * 4);
- 
--    /*
--     * first we must compute how much space to allocate for
--     * randr library's use; we'll allocate the structures in a single
--     * allocation, on cleanlyness grounds.
--     */
-+	/*
-+	 * first we must compute how much space to allocate for
-+	 * randr library's use; we'll allocate the structures in a single
-+	 * allocation, on cleanlyness grounds.
-+	 */
- 
--    rbytes = (sizeof (XRRCrtcInfo) +
--	      rep.nOutput * sizeof (RROutput) +
--	      rep.nPossibleOutput * sizeof (RROutput));
-+	rbytes = (sizeof (XRRCrtcInfo) +
-+		  rep.nOutput * sizeof (RROutput) +
-+		  rep.nPossibleOutput * sizeof (RROutput));
-+
-+	xci = (XRRCrtcInfo *) Xmalloc(rbytes);
-+    }
-+    else
-+    {
-+	nbytes = 0;
-+	nbytesRead = 0;
-+	rbytes = 0;
-+	xci = NULL;
-+    }
- 
--    xci = (XRRCrtcInfo *) Xmalloc(rbytes);
-     if (xci == NULL) {
- 	_XEatDataWords (dpy, rep.length);
- 	UnlockDisplay (dpy);
-@@ -194,12 +206,21 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
-     if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
- 	goto out;
- 
--    nbytes = (long) rep.length << 2;
-+    if (rep.length < INT_MAX >> 2)
-+    {
-+	nbytes = (long) rep.length << 2;
- 
--    /* three channels of CARD16 data */
--    nbytesRead = (rep.size * 2 * 3);
-+	/* three channels of CARD16 data */
-+	nbytesRead = (rep.size * 2 * 3);
- 
--    crtc_gamma = XRRAllocGamma (rep.size);
-+	crtc_gamma = XRRAllocGamma (rep.size);
-+    }
-+    else
-+    {
-+	nbytes = 0;
-+	nbytesRead = 0;
-+	crtc_gamma = NULL;
-+    }
- 
-     if (!crtc_gamma)
-     {
-@@ -357,7 +378,7 @@ XRRGetCrtcTransform (Display	*dpy,
-     xRRGetCrtcTransformReq	*req;
-     int				major_version, minor_version;
-     XRRCrtcTransformAttributes	*attr;
--    char			*extra = NULL, *e;
-+    char			*extra = NULL, *end = NULL, *e;
-     int				p;
- 
-     *attributes = NULL;
-@@ -395,9 +416,17 @@ XRRGetCrtcTransform (Display	*dpy,
- 	else
- 	{
- 	    int extraBytes = rep.length * 4 - CrtcTransformExtra;
--	    extra = Xmalloc (extraBytes);
-+	    if (rep.length < INT_MAX / 4 &&
-+		rep.length * 4 >= CrtcTransformExtra) {
-+		extra = Xmalloc (extraBytes);
-+		end = extra + extraBytes;
-+	    } else
-+		extra = NULL;
- 	    if (!extra) {
--		_XEatDataWords (dpy, rep.length - (CrtcTransformExtra >> 2));
-+		if (rep.length > (CrtcTransformExtra >> 2))
-+		    _XEatDataWords (dpy, rep.length - (CrtcTransformExtra >> 2));
-+		else
-+		    _XEatDataWords (dpy, rep.length);
- 		UnlockDisplay (dpy);
- 		SyncHandle ();
- 		return False;
-@@ -429,22 +458,38 @@ XRRGetCrtcTransform (Display	*dpy,
- 
-     e = extra;
- 
-+    if (e + rep.pendingNbytesFilter > end) {
-+	XFree (extra);
-+	return False;
-+    }
-     memcpy (attr->pendingFilter, e, rep.pendingNbytesFilter);
-     attr->pendingFilter[rep.pendingNbytesFilter] = '\0';
-     e += (rep.pendingNbytesFilter + 3) & ~3;
-     for (p = 0; p < rep.pendingNparamsFilter; p++) {
- 	INT32	f;
-+	if (e + 4 > end) {
-+	    XFree (extra);
-+	    return False;
-+	}
- 	memcpy (&f, e, 4);
- 	e += 4;
- 	attr->pendingParams[p] = (XFixed) f;
-     }
-     attr->pendingNparams = rep.pendingNparamsFilter;
- 
-+    if (e + rep.currentNbytesFilter > end) {
-+	XFree (extra);
-+	return False;
-+    }
-     memcpy (attr->currentFilter, e, rep.currentNbytesFilter);
-     attr->currentFilter[rep.currentNbytesFilter] = '\0';
-     e += (rep.currentNbytesFilter + 3) & ~3;
-     for (p = 0; p < rep.currentNparamsFilter; p++) {
- 	INT32	f;
-+	if (e + 4 > end) {
-+	    XFree (extra);
-+	    return False;
-+	}
- 	memcpy (&f, e, 4);
- 	e += 4;
- 	attr->currentParams[p] = (XFixed) f;
-diff --git a/src/XrrMonitor.c b/src/XrrMonitor.c
-index a9eaa7b..adc5330 100644
---- a/src/XrrMonitor.c
-+++ b/src/XrrMonitor.c
-@@ -24,6 +24,7 @@
- #include <config.h>
- #endif
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <X11/Xlib.h>
- /* we need to be able to manipulate the Display structure on events */
-@@ -65,6 +66,15 @@ XRRGetMonitors(Display *dpy, Window window, Bool get_active, int *nmonitors)
- 	return NULL;
-     }
- 
-+    if (rep.length > INT_MAX >> 2 ||
-+	rep.nmonitors > INT_MAX / SIZEOF(xRRMonitorInfo) ||
-+	rep.noutputs > INT_MAX / 4 ||
-+	rep.nmonitors * SIZEOF(xRRMonitorInfo) > INT_MAX - rep.noutputs * 4) {
-+	_XEatData (dpy, rep.length);
-+	UnlockDisplay (dpy);
-+	SyncHandle ();
-+	return NULL;
-+    }
-     nbytes = (long) rep.length << 2;
-     nmon = rep.nmonitors;
-     noutput = rep.noutputs;
-@@ -111,6 +121,14 @@ XRRGetMonitors(Display *dpy, Window window, Bool get_active, int *nmonitors)
- 	    mon[m].outputs = output;
- 	    buf += SIZEOF (xRRMonitorInfo);
- 	    xoutput = (CARD32 *) buf;
-+	    if (xmon->noutput > rep.noutputs) {
-+	        Xfree(buf);
-+	        Xfree(mon);
-+	        UnlockDisplay (dpy);
-+	        SyncHandle ();
-+	        return NULL;
-+	    }
-+	    rep.noutputs -= xmon->noutput;
- 	    for (o = 0; o < xmon->noutput; o++)
- 		output[o] = xoutput[o];
- 	    output += xmon->noutput;
-diff --git a/src/XrrOutput.c b/src/XrrOutput.c
-index 85f0b6e..30f3d40 100644
---- a/src/XrrOutput.c
-+++ b/src/XrrOutput.c
-@@ -25,6 +25,7 @@
- #include <config.h>
- #endif
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <X11/Xlib.h>
- /* we need to be able to manipulate the Display structure on events */
-@@ -60,6 +61,16 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output)
- 	return NULL;
-     }
- 
-+    if (rep.length > INT_MAX >> 2 || rep.length < (OutputInfoExtra >> 2))
-+    {
-+        if (rep.length > (OutputInfoExtra >> 2))
-+	    _XEatDataWords (dpy, rep.length - (OutputInfoExtra >> 2));
-+	else
-+	    _XEatDataWords (dpy, rep.length);
-+	UnlockDisplay (dpy);
-+	SyncHandle ();
-+	return NULL;
-+    }
-     nbytes = ((long) (rep.length) << 2) - OutputInfoExtra;
- 
-     nbytesRead = (long) (rep.nCrtcs * 4 +
-diff --git a/src/XrrProvider.c b/src/XrrProvider.c
-index 9e620c7..d796cd0 100644
---- a/src/XrrProvider.c
-+++ b/src/XrrProvider.c
-@@ -25,6 +25,7 @@
- #include <config.h>
- #endif
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <X11/Xlib.h>
- /* we need to be able to manipulate the Display structure on events */
-@@ -59,12 +60,20 @@ XRRGetProviderResources(Display *dpy, Window window)
-       return NULL;
-     }
- 
--    nbytes = (long) rep.length << 2;
-+    if (rep.length < INT_MAX >> 2) {
-+	nbytes = (long) rep.length << 2;
- 
--    nbytesRead = (long) (rep.nProviders * 4);
-+	nbytesRead = (long) (rep.nProviders * 4);
- 
--    rbytes = (sizeof(XRRProviderResources) + rep.nProviders * sizeof(RRProvider));
--    xrpr = (XRRProviderResources *) Xmalloc(rbytes);
-+	rbytes = (sizeof(XRRProviderResources) + rep.nProviders *
-+		  sizeof(RRProvider));
-+	xrpr = (XRRProviderResources *) Xmalloc(rbytes);
-+    } else {
-+	nbytes = 0;
-+	nbytesRead = 0;
-+	rbytes = 0;
-+	xrpr = NULL;
-+    }
- 
-     if (xrpr == NULL) {
-        _XEatDataWords (dpy, rep.length);
-@@ -121,6 +130,17 @@ XRRGetProviderInfo(Display *dpy, XRRScreenResources *resources, RRProvider provi
- 	return NULL;
-     }
- 
-+    if (rep.length > INT_MAX >> 2 || rep.length < ProviderInfoExtra >> 2)
-+    {
-+	if (rep.length < ProviderInfoExtra >> 2)
-+	    _XEatDataWords (dpy, rep.length);
-+	else
-+	    _XEatDataWords (dpy, rep.length - (ProviderInfoExtra >> 2));
-+	UnlockDisplay (dpy);
-+	SyncHandle ();
-+	return NULL;
-+    }
-+
-     nbytes = ((long) rep.length << 2) - ProviderInfoExtra;
- 
-     nbytesRead = (long)(rep.nCrtcs * 4 +
-diff --git a/src/XrrScreen.c b/src/XrrScreen.c
-index b8ce7e5..1f7ffe6 100644
---- a/src/XrrScreen.c
-+++ b/src/XrrScreen.c
-@@ -24,6 +24,7 @@
- #include <config.h>
- #endif
- 
-+#include <limits.h>
- #include <stdio.h>
- #include <X11/Xlib.h>
- /* we need to be able to manipulate the Display structure on events */
-@@ -105,27 +106,36 @@ doGetScreenResources (Display *dpy, Window window, int poll)
- 	xrri->has_rates = _XRRHasRates (xrri->minor_version, xrri->major_version);
-     }
- 
--    nbytes = (long) rep.length << 2;
-+    if (rep.length < INT_MAX >> 2) {
-+	nbytes = (long) rep.length << 2;
- 
--    nbytesRead = (long) (rep.nCrtcs * 4 +
--			 rep.nOutputs * 4 +
--			 rep.nModes * SIZEOF (xRRModeInfo) +
--			 ((rep.nbytesNames + 3) & ~3));
-+	nbytesRead = (long) (rep.nCrtcs * 4 +
-+			     rep.nOutputs * 4 +
-+			     rep.nModes * SIZEOF (xRRModeInfo) +
-+			     ((rep.nbytesNames + 3) & ~3));
- 
--    /*
--     * first we must compute how much space to allocate for
--     * randr library's use; we'll allocate the structures in a single
--     * allocation, on cleanlyness grounds.
--     */
-+	/*
-+	 * first we must compute how much space to allocate for
-+	 * randr library's use; we'll allocate the structures in a single
-+	 * allocation, on cleanlyness grounds.
-+	 */
-+
-+	rbytes = (sizeof (XRRScreenResources) +
-+		  rep.nCrtcs * sizeof (RRCrtc) +
-+		  rep.nOutputs * sizeof (RROutput) +
-+		  rep.nModes * sizeof (XRRModeInfo) +
-+		  rep.nbytesNames + rep.nModes);    /* '\0' terminate names */
- 
--    rbytes = (sizeof (XRRScreenResources) +
--	      rep.nCrtcs * sizeof (RRCrtc) +
--	      rep.nOutputs * sizeof (RROutput) +
--	      rep.nModes * sizeof (XRRModeInfo) +
--	      rep.nbytesNames + rep.nModes);	/* '\0' terminate names */
-+	xrsr = (XRRScreenResources *) Xmalloc(rbytes);
-+	wire_names = (char *) Xmalloc (rep.nbytesNames);
-+    } else {
-+	nbytes = 0;
-+	nbytesRead = 0;
-+	rbytes = 0;
-+	xrsr = NULL;
-+	wire_names = NULL;
-+    }
- 
--    xrsr = (XRRScreenResources *) Xmalloc(rbytes);
--    wire_names = (char *) Xmalloc (rep.nbytesNames);
-     if (xrsr == NULL || wire_names == NULL) {
- 	Xfree (xrsr);
- 	Xfree (wire_names);
-@@ -174,6 +184,14 @@ doGetScreenResources (Display *dpy, Window window, int poll)
-     wire_name = wire_names;
-     for (i = 0; i < rep.nModes; i++)  {
- 	xrsr->modes[i].name = names;
-+	if (xrsr->modes[i].nameLength > rep.nbytesNames) {
-+	    Xfree (xrsr);
-+	    Xfree (wire_names);
-+	    UnlockDisplay (dpy);
-+	    SyncHandle ();
-+	    return NULL;
-+	}
-+	rep.nbytesNames -= xrsr->modes[i].nameLength;
- 	memcpy (names, wire_name, xrsr->modes[i].nameLength);
- 	names[xrsr->modes[i].nameLength] = '\0';
- 	names += xrsr->modes[i].nameLength + 1;
--- 
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr_1.5.1.bb
similarity index 75%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr_1.5.1.bb
index 35c60b4..48e88d2 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr_1.5.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrandr_1.5.1.bb
@@ -19,8 +19,5 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI += "file://CVE-2016-7947_CVE-2016-7948.patch \
-	"
-
-SRC_URI[md5sum] = "309762867e41c6fd813da880d8a1bc93"
-SRC_URI[sha256sum] = "6f864959b7fc35db11754b270d71106ef5b5cf363426aa58589cb8ac8266de58"
+SRC_URI[md5sum] = "28e486f1d491b757173dd85ba34ee884"
+SRC_URI[sha256sum] = "1ff9e7fa0e4adea912b16a5f0cfa7c1d35b0dcda0e216831f7715c8a3abcf51a"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender/CVE-2016-7949.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender/CVE-2016-7949.patch
deleted file mode 100644
index 73315b1..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender/CVE-2016-7949.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 9362c7ddd1af3b168953d0737877bc52d79c94f4 Mon Sep 17 00:00:00 2001
-From: Tobias Stoeckmann <tobias@stoeckmann.org>
-Date: Sun, 25 Sep 2016 21:43:09 +0200
-Subject: Validate lengths while parsing server data.
-
-Individual lengths inside received server data can overflow
-the previously reserved memory.
-
-It is therefore important to validate every single length
-field to not overflow the previously agreed sum of all invidual
-length fields.
-
-v2: consume remaining bytes in the reply buffer on error.
-
-CVE: CVE-2016-7949
-Upstream-Status: Backport
-
-Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-Reviewed-by: Matthieu Herrb@laas.fr
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
-
-diff --git a/src/Xrender.c b/src/Xrender.c
-index 3102eb2..71cf3e6 100644
---- a/src/Xrender.c
-+++ b/src/Xrender.c
-@@ -533,12 +533,30 @@ XRenderQueryFormats (Display *dpy)
- 	screen->fallback = _XRenderFindFormat (xri, xScreen->fallback);
- 	screen->subpixel = SubPixelUnknown;
- 	xDepth = (xPictDepth *) (xScreen + 1);
-+	if (screen->ndepths > rep.numDepths) {
-+	    Xfree (xri);
-+	    Xfree (xData);
-+	    _XEatDataWords (dpy, rep.length);
-+	    UnlockDisplay (dpy);
-+	    SyncHandle ();
-+	    return 0;
-+	}
-+	rep.numDepths -= screen->ndepths;
- 	for (nd = 0; nd < screen->ndepths; nd++)
- 	{
- 	    depth->depth = xDepth->depth;
- 	    depth->nvisuals = xDepth->nPictVisuals;
- 	    depth->visuals = visual;
- 	    xVisual = (xPictVisual *) (xDepth + 1);
-+	    if (depth->nvisuals > rep.numVisuals) {
-+		Xfree (xri);
-+		Xfree (xData);
-+		_XEatDataWords (dpy, rep.length);
-+		UnlockDisplay (dpy);
-+		SyncHandle ();
-+		return 0;
-+	    }
-+	    rep.numVisuals -= depth->nvisuals;
- 	    for (nv = 0; nv < depth->nvisuals; nv++)
- 	    {
- 		visual->visual = _XRenderFindVisual (dpy, xVisual->visual);
--- 
-cgit v0.10.2
-
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.10.bb
similarity index 76%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.10.bb
index eac3679..92b3102 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxrender_0.9.10.bb
@@ -19,8 +19,6 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI += "file://CVE-2016-7949.patch \
-        "
+SRC_URI[md5sum] = "802179a76bded0b658f4e9ec5e1830a4"
+SRC_URI[sha256sum] = "c06d5979f86e64cabbde57c223938db0b939dff49fdb5a793a1d3d0396650949"
 
-SRC_URI[md5sum] = "5db92962b124ca3a8147daae4adbd622"
-SRC_URI[sha256sum] = "fc2fe57980a14092426dffcd1f2d9de0987b9d40adea663bd70d6342c0e9be1a"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb
index 31ea439..5717fa5 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxtst_1.2.3.bb
@@ -18,3 +18,4 @@
 
 SRC_URI[md5sum] = "ef8c2c1d16a00bd95b9fdcef63b8a2ca"
 SRC_URI[sha256sum] = "4655498a1b8e844e3d6f21f3b2c4e2b571effb5fd83199d428a6ba7ea4bf5204"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxv_1.0.10.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
similarity index 77%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxv_1.0.10.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
index f02b8b6..a226c27 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxv_1.0.10.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxv_1.0.11.bb
@@ -14,5 +14,6 @@
 
 XORG_PN = "libXv"
 
-SRC_URI[md5sum] = "e0af49d7d758b990e6fef629722d4aca"
-SRC_URI[sha256sum] = "55fe92f8686ce8612e2c1bfaf58c057715534419da700bda8d517b1d97914525"
+SRC_URI[md5sum] = "210b6ef30dda2256d54763136faa37b9"
+SRC_URI[sha256sum] = "d26c13eac99ac4504c532e8e76a1c8e4bd526471eb8a0a4ff2a88db60cb0b088"
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.9.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.10.bb
similarity index 76%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.9.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.10.bb
index 41e8498..6ed49b1 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.9.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/libxvmc_1.0.10.bb
@@ -15,5 +15,5 @@
 
 XORG_PN = "libXvMC"
 
-SRC_URI[md5sum] = "eba6b738ed5fdcd8f4203d7c8a470c79"
-SRC_URI[sha256sum] = "0703d7dff6ffc184f1735ca5d4eb9dbb402b522e08e008f2f96aee16c40a5756"
+SRC_URI[md5sum] = "4cbe1c1def7a5e1b0ed5fce8e512f4c6"
+SRC_URI[sha256sum] = "e501a079b5dfaef0897c56152770c77e05e362065cec58910289aa567277ee2e"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.20.bb
similarity index 87%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.20.bb
index 79fcbd8..d00904d 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.18.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.20.bb
@@ -13,8 +13,8 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
 
 SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "c28cf45616bfec276879360bc36c6b27"
-SRC_URI[sha256sum] = "c41d917d6c8a59feb7ccbda51c40a6ada824fdd1e9684b52dd48c9530617ddd0"
+SRC_URI[md5sum] = "1f68886339116ae3877052204c9b9b88"
+SRC_URI[sha256sum] = "d1bfc72553c4e3ef1cd6f13eec0488cf940498b612ab8a0b362e7090c94bc134"
 
 SECTION = "x11/libs"
 DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/presentproto_git.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/presentproto_git.bb
index dbb6f32..e6d32f9 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/presentproto_git.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/presentproto_git.bb
@@ -9,16 +9,14 @@
 
 LICENSE = "GPLv2"
 
-SRCREV = "24f3a56e541b0a9e6c6ee76081f441221a120ef9"
-PV = "1.0+git${SRCPV}"
+SRCREV = "bfdc7e052302c79c5803ad95a73c9b63b350c40c"
+PV = "1.1+git${SRCPV}"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=47e508ca280fde97906eacb77892c3ac"
 
 SRC_URI = "git://anongit.freedesktop.org/git/xorg/proto/presentproto"
 S = "${WORKDIR}/git"
 
-PR = "r1"
-
 inherit autotools
 
 BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.31.bb
similarity index 73%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.31.bb
index 412b6a2..febcc67 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.29.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-proto/xproto_7.0.31.bb
@@ -15,5 +15,5 @@
 EXTRA_OECONF_append = " --enable-specs=no"
 BBCLASSEXTEND = "native nativesdk"
 
-SRC_URI[md5sum] = "eeeae1f47d43a33ef0d5c56727410326"
-SRC_URI[sha256sum] = "6c1a477092ca73233902b8d5f33012635c4b0208f17e7833cc7efe5c93ba9f8a"
+SRC_URI[md5sum] = "16791f7ca8c51a20608af11702e51083"
+SRC_URI[sha256sum] = "c6f9747da0bd3a95f86b17fb8dd5e717c8f3ab7f0ece3ba1b247899ec1ef7747"
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-util/util-macros_1.19.1.bb
similarity index 75%
rename from import-layers/yocto-poky/meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb
rename to import-layers/yocto-poky/meta/recipes-graphics/xorg-util/util-macros_1.19.1.bb
index 26cf50f..b39d787 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-util/util-macros_1.19.0.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-util/util-macros_1.19.1.bb
@@ -9,8 +9,8 @@
 
 PE = "1"
 
-SRC_URI[md5sum] = "40e1caa49a71a26e0aa68ddd00203717"
-SRC_URI[sha256sum] = "0d4df51b29023daf2f63aebf3ebc638ea88efedfd560ab5866741ab3f92acaa1"
+SRC_URI[md5sum] = "3f8a8e6100556f7f28e469809805dee8"
+SRC_URI[sha256sum] = "472ad0e41d1e0abf5ecafd29460bf1b8d47e53d4b7d3abf1f66d02dc576547b8"
 
 # ${PN} is empty so we need to tweak -dev and -dbg package dependencies
 RDEPENDS_${PN}-dev = ""
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
deleted file mode 100644
index 72e4fbf..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/10-preload-modules.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-Section "Module"
-    Load "fbdevhw"
-    Load "fb"
-    Load "shadow"
-    Load "shadowfb"
-    Load "int10"
-    Load "vbe"
-    Load "vgahw"
-EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf
index 629ae21..f4cd139 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuarm/xorg.conf
@@ -2,34 +2,6 @@
 Section "Files"
 EndSection
 
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-    Driver        "mouse"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
 Section "Device"
     Identifier    "Graphics Controller"
     Driver        "fbdev"
@@ -62,8 +34,5 @@
 Section "ServerLayout"
     Identifier    "Default Layout"
     Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
     Option         "AllowEmptyInput" "no"
 EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf
index e6c8b51..1d3c64f 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips/xorg.conf
@@ -2,34 +2,6 @@
 Section "Files"
 EndSection
 
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-    Driver        "mouse"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
 Section "Device"
     Identifier    "Graphics Controller"
     Driver        "fbdev"
@@ -63,8 +35,5 @@
 Section "ServerLayout"
     Identifier    "Default Layout"
     Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
     Option         "AllowEmptyInput" "no"
 EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf
index 629ae21..f4cd139 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemumips64/xorg.conf
@@ -2,34 +2,6 @@
 Section "Files"
 EndSection
 
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-    Driver        "mouse"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
 Section "Device"
     Identifier    "Graphics Controller"
     Driver        "fbdev"
@@ -62,8 +34,5 @@
 Section "ServerLayout"
     Identifier    "Default Layout"
     Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
     Option         "AllowEmptyInput" "no"
 EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf
index 629ae21..f4cd139 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemuppc/xorg.conf
@@ -2,34 +2,6 @@
 Section "Files"
 EndSection
 
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-    Driver        "mouse"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
 Section "Device"
     Identifier    "Graphics Controller"
     Driver        "fbdev"
@@ -62,8 +34,5 @@
 Section "ServerLayout"
     Identifier    "Default Layout"
     Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
     Option         "AllowEmptyInput" "no"
 EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf
index 629ae21..f4cd139 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemush4/xorg.conf
@@ -2,34 +2,6 @@
 Section "Files"
 EndSection
 
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-    Driver        "mouse"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
 Section "Device"
     Identifier    "Graphics Controller"
     Driver        "fbdev"
@@ -62,8 +34,5 @@
 Section "ServerLayout"
     Identifier    "Default Layout"
     Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
     Option         "AllowEmptyInput" "no"
 EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
index bbda9ea..c12d92c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86-64/xorg.conf
@@ -2,34 +2,6 @@
 Section "Files"
 EndSection
 
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-    Driver        "vmmouse"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
 Section "Monitor"
     Identifier    "Generic Monitor"
     Option        "DPMS"
@@ -57,8 +29,5 @@
 Section "ServerLayout"
     Identifier    "Default Layout"
     Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
     Option         "AllowEmptyInput" "no"
 EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
index bbda9ea..c12d92c 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config/qemux86/xorg.conf
@@ -2,34 +2,6 @@
 Section "Files"
 EndSection
 
-Section "InputDevice"
-    Identifier    "Generic Keyboard"
-    Driver        "evdev"
-    Option        "CoreKeyboard"
-    Option        "Device"      "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
-    Option        "XkbRules"    "xorg"
-    Option        "XkbModel"    "evdev"
-    Option        "XkbLayout"    "us"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Configured Mouse"
-    Driver        "vmmouse"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/mice"
-    Option        "Protocol"        "ImPS/2"
-    Option        "ZAxisMapping"        "4 5"
-    Option        "Emulate3Buttons"    "true"
-EndSection
-
-Section "InputDevice"
-    Identifier    "Qemu Tablet"
-    Driver        "evdev"
-    Option        "CorePointer"
-    Option        "Device"        "/dev/input/touchscreen0"
-    Option        "USB"           "on"
-EndSection
-
 Section "Monitor"
     Identifier    "Generic Monitor"
     Option        "DPMS"
@@ -57,8 +29,5 @@
 Section "ServerLayout"
     Identifier    "Default Layout"
     Screen        "Default Screen"
-    InputDevice    "Generic Keyboard"
-    # InputDevice    "Configured Mouse"
-    InputDevice    "QEMU Tablet"
     Option         "AllowEmptyInput" "no"
 EndSection
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
index e07c204..4c442bc 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bb
@@ -7,10 +7,6 @@
 
 SRC_URI = "file://xorg.conf"
 
-SRC_URI_append_libc-musl = "\
-          file://10-preload-modules.conf \
-"
-
 S = "${WORKDIR}"
 
 CONFFILES_${PN} = "${sysconfdir}/X11/xorg.conf"
@@ -25,7 +21,3 @@
 		install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/
 	fi
 }
-
-do_install_append_libc-musl () {
-	install -Dm 0644 ${WORKDIR}/10-preload-modules.conf ${D}/${sysconfdir}/X11/xorg.conf.d/10-preload-modules.conf
-}
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index 29503b1..1650c79 100644
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -27,7 +27,7 @@
 REQUIRED_DISTRO_FEATURES = "x11"
 
 PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86vidmodeproto compositeproto recordproto resourceproto videoproto scrnsaverproto  xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto presentproto"
-LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
+LIB_DEPS = "pixman libxfont2 xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
 DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util"
 
 # Split out some modules and extensions from the main package
@@ -71,7 +71,7 @@
 SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver"
 INSANE_SKIP_${MLPREFIX}xf86-video-modesetting = "xorg-driver-abi"
 
-XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp"
+XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp xf86-input-libinput"
 RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}"
 RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}"
 RDEPENDS_${PN}-xvfb += "xkeyboard-config"
@@ -117,12 +117,14 @@
                  --sysconfdir=/etc/X11 \
                  --localstatedir=/var \
                  --with-xkb-output=/var/lib/xkb \
+                 WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
 "
 
+OPENGL_PKGCONFIGS = "dri glx glamor dri3 xshmfence"
 PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \
-                   ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \
-                   ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xwayland', '', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
 "
 
 PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
@@ -138,7 +140,7 @@
 PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,"
 PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd"
 PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xineramaproto"
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland libepoxy"
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland wayland-native wayland-protocols libepoxy"
 
 # Xorg requires a SHA1 implementation, pick one
 XORG_CRYPTO ??= "openssl"
@@ -170,10 +172,10 @@
                              shell=True, env=newenv, stdout=subprocess.PIPE)
         stdout, stderr = p.communicate()
         output = stdout.decode("utf-8").split(".")[0]
-        mlprefix = d.getVar('MLPREFIX', True) or ''
+        mlprefix = d.getVar('MLPREFIX') or ''
         return "%sxorg-abi-%s-%s" % (mlprefix, name, output)
 
-    pn = d.getVar("PN", True)
+    pn = d.getVar("PN")
     d.appendVar("RPROVIDES_" + pn, " " + get_abi("input"))
     d.appendVar("RPROVIDES_" + pn, " " + get_abi("video"))
 }
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch
new file mode 100644
index 0000000..16ec3ed
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch
@@ -0,0 +1,61 @@
+Discover monotonic clock using compile-time check
+
+monotonic clock check does not work when cross-compiling.
+
+Upstream-Status: Denied [Does not work on OpenBSD]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+
+Original patch follows:
+
+When xorg-xserver is being cross-compiled, there is currently no way
+for us to detect whether the monotonic clock is available on the
+target system, because we aren't able to run a test program on the host
+system. Currently, in this situation, we default to not use the
+monotonic clock. One problem with this situation is that the user will
+be treated as idle when the date is updated.
+
+To fix this situation, we now use a compile-time check to detect whether the
+monotonic clock is available. This check can run just fine when we are
+cross-compiling.
+
+Signed-off-by: David James <davidjames at google.com>
+---
+ configure.ac | 17 +++++++----------
+ 1 file changed, 7 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f7ab48c..26e85cd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1048,19 +1048,16 @@ if ! test "x$have_clock_gettime" = xno; then
+         CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L"
+     fi
+ 
+-    AC_RUN_IFELSE([AC_LANG_SOURCE([
++    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #include <time.h>
+-
+-int main(int argc, char *argv[[]]) {
+-    struct timespec tp;
+-
+-    if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
++#include <unistd.h>
++int main() {
++#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
++        #error No monotonic clock
++#endif
+         return 0;
+-    else
+-        return 1;
+ }
+-    ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
+-       [MONOTONIC_CLOCK="cross compiling"])
++]])],[MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no])
+ 
+     LIBS="$LIBS_SAVE"
+     CPPFLAGS="$CPPFLAGS_SAVE"
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch
new file mode 100644
index 0000000..eafd07a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch
@@ -0,0 +1,38 @@
+From 963428f914c42270d3312d4f0c0840565521534e Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 16 Nov 2016 00:41:51 +0200
+Subject: [PATCH 2/2] configure.ac: Fix wayland-scanner and protocols locations
+
+We want to use the wayland-scanner in path (native sysroot)
+instead of using pkg-config which gives us target paths.
+
+The protocols paths on the other hand need to be prefixed with the
+(allarch) sysroot because, again, pkg-config gives us target paths.
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 58f1567..383a7df 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2525,11 +2525,9 @@ if test "x$XWAYLAND" = xyes; then
+ 		AC_MSG_ERROR([Xwayland requires CLOCK_MONOTONIC support.])
+ 	fi
+ 
+-	WAYLAND_PREFIX=`$PKG_CONFIG --variable=prefix wayland-client`
+-	AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner],,
+-		     [${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
++	AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+ 
+-	AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
++	AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
+ fi
+ 
+ 
+-- 
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch
new file mode 100644
index 0000000..beed6cb
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-Remove-check-for-useSIGIO-option.patch
@@ -0,0 +1,47 @@
+From cf407b16cd65ad6e26a9c8e5984e163409a5c0f7 Mon Sep 17 00:00:00 2001
+From: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
+Date: Mon, 30 Jan 2017 16:32:06 -0600
+Subject: [PATCH] Remove check for useSIGIO option
+
+Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removes the configure of useSIGIO
+option.
+
+As the xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO
+and OsReleaseSIGIO.
+
+No longer the check for useSIGIO is needed
+
+Upstream-Status: Pending
+
+Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
+---
+ hw/xfree86/os-support/shared/sigio.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
+index 884a71c..be76498 100644
+--- a/hw/xfree86/os-support/shared/sigio.c
++++ b/hw/xfree86/os-support/shared/sigio.c
+@@ -185,9 +185,6 @@ xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure)
+     int i;
+     int installed = FALSE;
+ 
+-    if (!xf86Info.useSIGIO)
+-        return 0;
+-
+     for (i = 0; i < MAX_FUNCS; i++) {
+         if (!xf86SigIOFuncs[i].f) {
+             if (xf86IsPipe(fd))
+@@ -256,9 +253,6 @@ xf86RemoveSIGIOHandler(int fd)
+     int max;
+     int ret;
+ 
+-    if (!xf86Info.useSIGIO)
+-        return 0;
+-
+     max = 0;
+     ret = 0;
+     for (i = 0; i < MAX_FUNCS; i++) {
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch
new file mode 100644
index 0000000..5243761
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0003-modesetting-Fix-16-bit-depth-bpp-mode.patch
@@ -0,0 +1,46 @@
+From 5028ef46ff4ab0930224b71024a7349b05610d42 Mon Sep 17 00:00:00 2001
+From: Stefan Agner <stefan@agner.ch>
+Date: Thu, 22 Dec 2016 15:41:06 +0100
+Subject: [PATCH] modesetting: Fix 16 bit depth/bpp mode
+
+When setting DefaultDepth to 16 in the Screen section, the current
+code requests a 32 bpp framebuffer, however the X-Server seems to
+assumes 16 bpp.
+
+Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp
+conversion in shadow update")
+
+Signed-off-by: Stefan Agner <stefan@agner.ch>
+
+Upstream-Status: Submitted [1]
+
+[1] https://lists.x.org/archives/xorg-devel/2016-December/052113.html
+---
+ hw/xfree86/drivers/modesetting/driver.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
+index d7030e5..647ad83 100644
+--- a/hw/xfree86/drivers/modesetting/driver.c
++++ b/hw/xfree86/drivers/modesetting/driver.c
+@@ -930,7 +930,7 @@ PreInit(ScrnInfoPtr pScrn, int flags)
+                    "Using 24bpp hw front buffer with 32bpp shadow\n");
+         defaultbpp = 32;
+     } else {
+-        ms->drmmode.kbpp = defaultbpp;
++        ms->drmmode.kbpp = 0;
+     }
+     bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb;
+ 
+@@ -950,6 +950,8 @@ PreInit(ScrnInfoPtr pScrn, int flags)
+         return FALSE;
+     }
+     xf86PrintDepthBpp(pScrn);
++    if (!ms->drmmode.kbpp)
++        ms->drmmode.kbpp = pScrn->bitsPerPixel;
+ 
+     /* Process the options */
+     xf86CollectOptions(pScrn, NULL);
+-- 
+2.7.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch
new file mode 100644
index 0000000..23c8049
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-1.patch
@@ -0,0 +1,76 @@
+From 215f894965df5fb0bb45b107d84524e700d2073c Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Wed, 24 May 2017 15:54:40 +0300
+Subject: [PATCH] dix: Disallow GenericEvent in SendEvent request.
+
+The SendEvent request holds xEvent which is exactly 32 bytes long, no more,
+no less. Both ProcSendEvent and SProcSendEvent verify that the received data
+exactly match the request size. However nothing stops the client from passing
+in event with xEvent::type = GenericEvent and any value of
+xGenericEvent::length.
+
+In the case of ProcSendEvent, the event will be eventually passed to
+WriteEventsToClient which will see that it is Generic event and copy the
+arbitrary length from the receive buffer (and possibly past it) and send it to
+the other client. This allows clients to copy unitialized heap memory out of X
+server or to crash it.
+
+In case of SProcSendEvent, it will attempt to swap the incoming event by
+calling a swapping function from the EventSwapVector array. The swapped event
+is written to target buffer, which in this case is local xEvent variable. The
+xEvent variable is 32 bytes long, but the swapping functions for GenericEvents
+expect that the target buffer has size matching the size of the source
+GenericEvent. This allows clients to cause stack buffer overflows.
+
+Signed-off-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+CVE: CVE-2017-10971
+
+Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=215f894965df5fb0bb45b107d84524e700d2073c]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ dix/events.c  |    6 ++++++
+ dix/swapreq.c |    7 +++++++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/dix/events.c b/dix/events.c
+index 3e3a01e..d3a33ea 100644
+--- a/dix/events.c
++++ b/dix/events.c
+@@ -5366,6 +5366,12 @@ ProcSendEvent(ClientPtr client)
+         client->errorValue = stuff->event.u.u.type;
+         return BadValue;
+     }
++    /* Generic events can have variable size, but SendEvent request holds
++       exactly 32B of event data. */
++    if (stuff->event.u.u.type == GenericEvent) {
++        client->errorValue = stuff->event.u.u.type;
++        return BadValue;
++    }
+     if (stuff->event.u.u.type == ClientMessage &&
+         stuff->event.u.u.detail != 8 &&
+         stuff->event.u.u.detail != 16 && stuff->event.u.u.detail != 32) {
+diff --git a/dix/swapreq.c b/dix/swapreq.c
+index 719e9b8..6785059 100644
+--- a/dix/swapreq.c
++++ b/dix/swapreq.c
+@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client)
+     swapl(&stuff->destination);
+     swapl(&stuff->eventMask);
+ 
++    /* Generic events can have variable size, but SendEvent request holds
++       exactly 32B of event data. */
++    if (stuff->event.u.u.type == GenericEvent) {
++        client->errorValue = stuff->event.u.u.type;
++        return BadValue;
++    }
++
+     /* Swap event */
+     proc = EventSwapVector[stuff->event.u.u.type & 0177];
+     if (!proc || proc == NotImplemented)        /* no swapping proc; invalid event type? */
+-- 
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch
new file mode 100644
index 0000000..5c9887a
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-2.patch
@@ -0,0 +1,55 @@
+From 8caed4df36b1f802b4992edcfd282cbeeec35d9d Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Wed, 24 May 2017 15:54:41 +0300
+Subject: [PATCH] Xi: Verify all events in ProcXSendExtensionEvent.
+
+The requirement is that events have type in range
+EXTENSION_EVENT_BASE..lastEvent, but it was tested
+only for first event of all.
+
+Signed-off-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+CVE: CVE-2017-10971
+
+Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=8caed4df36b1f802b4992edcfd282cbeeec35d9d]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ Xi/sendexev.c |   12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/Xi/sendexev.c b/Xi/sendexev.c
+index 1cf118a..5e63bfc 100644
+--- a/Xi/sendexev.c
++++ b/Xi/sendexev.c
+@@ -117,7 +117,7 @@ SProcXSendExtensionEvent(ClientPtr client)
+ int
+ ProcXSendExtensionEvent(ClientPtr client)
+ {
+-    int ret;
++    int ret, i;
+     DeviceIntPtr dev;
+     xEvent *first;
+     XEventClass *list;
+@@ -141,10 +141,12 @@ ProcXSendExtensionEvent(ClientPtr client)
+     /* The client's event type must be one defined by an extension. */
+ 
+     first = ((xEvent *) &stuff[1]);
+-    if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
+-          (first->u.u.type < lastEvent))) {
+-        client->errorValue = first->u.u.type;
+-        return BadValue;
++    for (i = 0; i < stuff->num_events; i++) {
++        if (!((EXTENSION_EVENT_BASE <= first[i].u.u.type) &&
++            (first[i].u.u.type < lastEvent))) {
++            client->errorValue = first[i].u.u.type;
++            return BadValue;
++        }
+     }
+ 
+     list = (XEventClass *) (first + stuff->num_events);
+-- 
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch
new file mode 100644
index 0000000..54ba481
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/CVE-2017-10971-3.patch
@@ -0,0 +1,50 @@
+From ba336b24052122b136486961c82deac76bbde455 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Wed, 24 May 2017 15:54:42 +0300
+Subject: [PATCH] Xi: Do not try to swap GenericEvent.
+
+The SProcXSendExtensionEvent must not attempt to swap GenericEvent because
+it is assuming that the event has fixed size and gives the swapping function
+xEvent-sized buffer.
+
+A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway.
+
+Signed-off-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+CVE: CVE-2017-10971
+
+Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/xserver/commit/?id=ba336b24052122b136486961c82deac76bbde455]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ Xi/sendexev.c |   10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/Xi/sendexev.c b/Xi/sendexev.c
+index 5e63bfc..5c2e0fc 100644
+--- a/Xi/sendexev.c
++++ b/Xi/sendexev.c
+@@ -95,9 +95,17 @@ SProcXSendExtensionEvent(ClientPtr client)
+ 
+     eventP = (xEvent *) &stuff[1];
+     for (i = 0; i < stuff->num_events; i++, eventP++) {
++        if (eventP->u.u.type == GenericEvent) {
++            client->errorValue = eventP->u.u.type;
++            return BadValue;
++        }
++
+         proc = EventSwapVector[eventP->u.u.type & 0177];
+-        if (proc == NotImplemented)     /* no swapping proc; invalid event type? */
++        /* no swapping proc; invalid event type? */
++        if (proc == NotImplemented) {
++            client->errorValue = eventP->u.u.type;
+             return BadValue;
++        }
+         (*proc) (eventP, &eventT);
+         *eventP = eventT;
+     }
+-- 
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb
deleted file mode 100644
index 6700565..0000000
--- a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.4.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-require xserver-xorg.inc
-
-SRC_URI += "file://musl-arm-inb-outb.patch"
-SRC_URI[md5sum] = "d4842dfe3bd9a9d062f2fa1df9104a46"
-SRC_URI[sha256sum] = "278459b2c31d61a15655d95a72fb79930c480a6bb8cf9226e48a07df8b1d31c8"
-
-# These extensions are now integrated into the server, so declare the migration
-# path for in-place upgrades.
-
-RREPLACES_${PN} =  "${PN}-extension-dri \
-                    ${PN}-extension-dri2 \
-                    ${PN}-extension-record \
-                    ${PN}-extension-extmod \
-                    ${PN}-extension-dbe \
-                   "
-RPROVIDES_${PN} =  "${PN}-extension-dri \
-                    ${PN}-extension-dri2 \
-                    ${PN}-extension-record \
-                    ${PN}-extension-extmod \
-                    ${PN}-extension-dbe \
-                   "
-RCONFLICTS_${PN} = "${PN}-extension-dri \
-                    ${PN}-extension-dri2 \
-                    ${PN}-extension-record \
-                    ${PN}-extension-extmod \
-                    ${PN}-extension-dbe \
-                   "
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.1.bb b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.1.bb
new file mode 100644
index 0000000..0d6df32
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.19.1.bb
@@ -0,0 +1,35 @@
+require xserver-xorg.inc
+
+SRC_URI += "file://musl-arm-inb-outb.patch \
+            file://0001-configure.ac-Fix-check-for-CLOCK_MONOTONIC.patch \
+            file://0002-configure.ac-Fix-wayland-scanner-and-protocols-locat.patch \
+            file://0003-modesetting-Fix-16-bit-depth-bpp-mode.patch \
+            file://0003-Remove-check-for-useSIGIO-option.patch \
+            file://CVE-2017-10971-1.patch \
+            file://CVE-2017-10971-2.patch \
+            file://CVE-2017-10971-3.patch \
+            "
+SRC_URI[md5sum] = "caa8ee7b2950abbf734347d137529fb6"
+SRC_URI[sha256sum] = "79ae2cf39d3f6c4a91201d8dad549d1d774b3420073c5a70d390040aa965a7fb"
+
+# These extensions are now integrated into the server, so declare the migration
+# path for in-place upgrades.
+
+RREPLACES_${PN} =  "${PN}-extension-dri \
+                    ${PN}-extension-dri2 \
+                    ${PN}-extension-record \
+                    ${PN}-extension-extmod \
+                    ${PN}-extension-dbe \
+                   "
+RPROVIDES_${PN} =  "${PN}-extension-dri \
+                    ${PN}-extension-dri2 \
+                    ${PN}-extension-record \
+                    ${PN}-extension-extmod \
+                    ${PN}-extension-dbe \
+                   "
+RCONFLICTS_${PN} = "${PN}-extension-dri \
+                    ${PN}-extension-dri2 \
+                    ${PN}-extension-record \
+                    ${PN}-extension-extmod \
+                    ${PN}-extension-dbe \
+                   "